Re: [Xen-devel] Infiniband support

2016-01-07 Thread Gohar Irfan
Thanks a lot for the response.

I am not sure if I asked it right: I already have Infiniband installed on
my kernel and it is working fine in the user space. However, I would like
to use the RDMA Verbs API inside the Xen code, like calling RDMA functions
to send/receive data. That requires Infiniband headers to be included in
the Xen code, but I'm have difficulty with that. So is there any sample
code of someone already calling Infiniband/RDMA functions within Xen code
or any guide on how to recompile Xen with custom headers?

Thanks a lot!
On Thu, Jan 7, 2016 at 2:34 PM Ian Campbell  wrote:

> On Wed, 2016-01-06 at 06:54 +0000, Gohar Irfan wrote:
> > Hi,
> >
> > Can anyone guide me on how to compile Xen with Infiniband support?
> > (Particularly Mellanox)
> > I want to perform some RDMA read/write functionality from within the Xen
> > code (it is for a course project) using the Verbs API.
>
> Xen itself doesn't typically contain I/O drivers at all, that is delegated
> to the domain 0 or driver domain kernel(s).
>
> IOW you need to be looking at how to compile Infiniband support into your
> dom0 kernel, i.e. in Linux or BSD or whatever, I would presume there are
> plenty of resources on that subject on the web.
>
> Ian.
>
>
> >
> > Thanks,
> > Gohar
> >
> > ___
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] Infiniband support

2016-01-06 Thread Gohar Irfan
Hi,

Can anyone guide me on how to compile Xen with Infiniband support?
(Particularly Mellanox)
I want to perform some RDMA read/write functionality from within the Xen
code (it is for a course project) using the Verbs API.

Thanks,
Gohar
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] subscribe

2016-01-06 Thread Gohar Irfan

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] sh_page_fault

2015-12-12 Thread Gohar Irfan
In case of HVM guests, where is the sh_page_fault function called?
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] HVM guest creation

2015-12-11 Thread Gohar Irfan
Where in the code base is the initialization of a new domain (to run
unmodified guests) done? Where is it given the details about the memory it
has access to?
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] nr_pages increase

2015-12-10 Thread Gohar Irfan
Is it possible to increase the number of pages (or memory size) visible to
the guest OS (domU)? Perhaps at boot-time?
Can this be achieved by increasing the value of nr_pages in the start_info
struct when it is initialized? Where exactly in the code is this happening?

Thanks
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] Page Fault

2015-11-30 Thread Gohar Irfan
Sorry, my apologies. I got it now, thanks!

On Mon, Nov 30, 2015 at 3:32 PM Jan Beulich  wrote:

> >>> On 29.11.15 at 19:19,  wrote:
> > Inside the page fault handler for shadow page tables (sh_page_fault
> > function in multi.c) where is the code for swapping in a page from disk?
>
> There is no swapping in from disk in that code. You probably think
> of memory-paging, which has nothing to do with shadow code.
>
> Jan
>
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] Page Fault

2015-11-29 Thread Gohar Irfan
Inside the page fault handler for shadow page tables (sh_page_fault
function in multi.c) where is the code for swapping in a page from disk?
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] Page Table

2015-10-18 Thread Gohar Irfan
Where does Xen maintain the page table for each VM? The mapping of page
number to frame numbers, basically.
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] help for snapshot

2015-10-12 Thread Gohar Irfan
I'm also working on a similar thing - can you please tell me how you copy
the memory pages from one part of the memory to another?

On Tue, Oct 13, 2015 at 10:04 AM 高强  wrote:

> Hi,alls
>
> I'm modifying the source code of xen-4.4.1. Specifically, I'm modifying
> the memory copy part of snapshot. I first put all memory pages to write
> protection, and then rewrite the write protection exception part of the
> code. After capture the exception  then save the memory page , and all
> memory page copy is complete, call the function xenaccess_teardown(xch,
> xenaccess), but there is a mistake:
>
> libxl: error: libxl_utils.c:396:libxl_read_exactly: file/stream truncated
> reading ipc msg header from domain 3 save/restore helper stdout pipe
> libxl: error: libxl_exec.c:129:libxl_report_child_exitstatus: domain 3
> save/restore helper [-1] died due to fatal signal Segmentation fault (core
> dumped)
> Failed to save domain, resuming domain
>
> Has anyone ever meet this kind of problem, and who can tell me the cause
> of the error.
>
> Thanks
> ___
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] Malloc

2015-09-29 Thread Gohar Irfan
What is the alternate of doing a malloc in Xen?
I have a data structure (containing a list from the list.h implementation) and 
I want to initialize a pointer and allocate space for my struct. But since 
malloc doesn’t work in Xen, what should I do?

Thanks
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] Page Table Entry Modifications

2015-09-28 Thread Gohar Irfan
A clarification:
I also want to COPY the contents of the frames, so there will be no memory
corruption. In essence, only the frame numbers will be changed.

My other question, which is sort of a follow up to this, may be relevant:

"Given two GMFN in shadow paging (HVM) is there a way to swap their
contents? Let's say I have GMFN x and GMFN y, I want to put the contents of
x in y and the contents of y in x. "

Thanks a lot!

On Sun, Sep 27, 2015 at 9:04 PM Gohar Irfan  wrote:

> This might not seem useful or anything, but this is a part of an
> experiment so I will describe what I'm trying to do:
>
> Divide the memory into two equal halves and call them A and B.
> Let's say region A has 10 pages, from page numbers 1 to 10. Region B has
> 10 pages from page numbers 11 to 20 (hypothetical, of course.)
> When a page from region B (page number 11 to 20) is being accessed, say
> page 15, then swap the contents of page 15 with the contents of one of the
> pages from region A, say page 5.
> To achieve this, I need some help. In the default scenario, page 15 points
> to frame X and page 5 points to frame Y. I want to make page 15 point to
> frame Y and page 5 to frame X of the memory.
>
> I want to run this experiment and find the degradation in performance for
> a project.
> If some portion of this seems vague, I can explain. But I urgently need
> help on how to achieve this.
>
> My understanding is that it can be done in the page fault handler of
> shadow page tables. I have mentioned the relevant file and function earlier
> in this thread.
>
> Thanks a lot!
>
> On Sun, Sep 27, 2015 at 7:57 PM Meng Xu  wrote:
>
>> 2015-09-23 4:42 GMT-04:00 Gohar Irfan :
>> >
>> > It is for a project, I'm trying to experiment with a couple of things.
>>
>> Well, this is too general... Everything can be a project. People tries
>> to know what exact things you want to achieve so that they can figure
>> out if you are heading the correct direction.
>>
>> Meng
>>
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] Swap Frame Contents

2015-09-28 Thread Gohar Irfan
Given two GMFN in shadow paging (HVM) is there a way to swap their
contents? Let's say I have GMFN x and GMFN y, I want to put the contents of
x in y and the contents of y in x.

Thanks.
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] Page Table Entry Modifications

2015-09-27 Thread Gohar Irfan
This might not seem useful or anything, but this is a part of an experiment
so I will describe what I'm trying to do:

Divide the memory into two equal halves and call them A and B.
Let's say region A has 10 pages, from page numbers 1 to 10. Region B has 10
pages from page numbers 11 to 20 (hypothetical, of course.)
When a page from region B (page number 11 to 20) is being accessed, say
page 15, then swap the contents of page 15 with the contents of one of the
pages from region A, say page 5.
To achieve this, I need some help. In the default scenario, page 15 points
to frame X and page 5 points to frame Y. I want to make page 15 point to
frame Y and page 5 to frame X of the memory.

I want to run this experiment and find the degradation in performance for a
project.
If some portion of this seems vague, I can explain. But I urgently need
help on how to achieve this.

My understanding is that it can be done in the page fault handler of shadow
page tables. I have mentioned the relevant file and function earlier in
this thread.

Thanks a lot!

On Sun, Sep 27, 2015 at 7:57 PM Meng Xu  wrote:

> 2015-09-23 4:42 GMT-04:00 Gohar Irfan :
> >
> > It is for a project, I'm trying to experiment with a couple of things.
>
> Well, this is too general... Everything can be a project. People tries
> to know what exact things you want to achieve so that they can figure
> out if you are heading the correct direction.
>
> Meng
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] Page Table Entry Modifications

2015-09-27 Thread Gohar Irfan
Could someone please help me with this? It's really important and urgent.

Thanks a lot!

On Wed, Sep 23, 2015 at 1:42 PM Gohar Irfan  wrote:

> It is for a project, I'm trying to experiment with a couple of things.
>
> Could you please guide me how this could be achieved? Some relevant chunks
> of code, perhaps?
>
> Thanks!
>
> On Wed, Sep 23, 2015 at 1:35 PM Andrew Cooper 
> wrote:
>
>> On 22/09/15 20:35, Gohar Irfan wrote:
>>
>> Hi All,
>>
>> I want to know if, in the case of HVM (shadow page tables), we can change
>> the machine frame number pointed to by a page table entry?
>>
>>
>> Yes - Xen is able to change the mfn in a pte.
>>
>>
>> An overly simplified example would be: let's say I have page number 10
>> that is pointing to machine frame number 10, but I would like it to point
>> to machine frame number 1?
>>
>>
>> Yes - that is in theory possible.
>>
>>
>> Can this be achieved inside the "sh_page_fault" function inside
>> "xen/arch/x86/mm/shadow/multi.c" as this seems like a relevant place for
>> this modification to me.
>>
>>
>> What are you trying to achieve?  Modifications such as what you request
>> are possible, but you are exceedingly likely to end up with memory
>> corruption as a result.
>>
>>
>> ~Andrew
>>
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] Page Table Entry Modifications

2015-09-23 Thread Gohar Irfan
It is for a project, I'm trying to experiment with a couple of things.

Could you please guide me how this could be achieved? Some relevant chunks
of code, perhaps?

Thanks!

On Wed, Sep 23, 2015 at 1:35 PM Andrew Cooper 
wrote:

> On 22/09/15 20:35, Gohar Irfan wrote:
>
> Hi All,
>
> I want to know if, in the case of HVM (shadow page tables), we can change
> the machine frame number pointed to by a page table entry?
>
>
> Yes - Xen is able to change the mfn in a pte.
>
>
> An overly simplified example would be: let's say I have page number 10
> that is pointing to machine frame number 10, but I would like it to point
> to machine frame number 1?
>
>
> Yes - that is in theory possible.
>
>
> Can this be achieved inside the "sh_page_fault" function inside
> "xen/arch/x86/mm/shadow/multi.c" as this seems like a relevant place for
> this modification to me.
>
>
> What are you trying to achieve?  Modifications such as what you request
> are possible, but you are exceedingly likely to end up with memory
> corruption as a result.
>
>
> ~Andrew
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] Page Table Entry Modifications

2015-09-22 Thread Gohar Irfan
Hi All,

I want to know if, in the case of HVM (shadow page tables), we can change
the machine frame number pointed to by a page table entry?
An overly simplified example would be: let's say I have page number 10 that
is pointing to machine frame number 10, but I would like it to point to
machine frame number 1? Can this be achieved inside the "sh_page_fault"
function inside "xen/arch/x86/mm/shadow/multi.c" as this seems like a
relevant place for this modification to me.

Thanks!
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel