Mohamad Rezaei
2011-Dec-24 12:36 UTC
mapping virtual address to corresponding shadow page in xen
hi, How can I get corresponding shadowed page number of a virtual address in vm? -- Best Regards, Mohamad Rezaei
Tim Deegan
2011-Dec-24 12:49 UTC
Re: mapping virtual address to corresponding shadow page in xen
At 16:06 +0330 on 24 Dec (1324742798), Mohamad Rezaei wrote:> hi, > > How can I get corresponding shadowed page number of a virtual address in vm?I''m afraid I don''t know what you mean. Please read this: http://wiki.xen.org/wiki/AskingXenDevelQuestions and try again. Cheers, Tim.
Mohamad Rezaei
2011-Dec-24 12:56 UTC
Re: mapping virtual address to corresponding shadow page in xen
My question is when I want to read a data from domain, I use copy_from_guest. but now I want to map that address in domain (guest) to an address inside xen (hypervisor). I need to translate that address. somehow like this: gva -> gpfn -> gmfn -> mfn. To do this I have started a dom0 with dom0_shadow=1 option. So I presume that vtx is enabled for dom0. Best Regards Mohamad Rezaei -------------------- Distributed Systems Research Laboratory Computer Engineering Department Iran University of Science and Technology On Sat, Dec 24, 2011 at 4:19 PM, Tim Deegan <tim@xen.org> wrote:> At 16:06 +0330 on 24 Dec (1324742798), Mohamad Rezaei wrote: >> hi, >> >> How can I get corresponding shadowed page number of a virtual address in vm? > > I''m afraid I don''t know what you mean. > > Please read this: http://wiki.xen.org/wiki/AskingXenDevelQuestions > and try again. > > Cheers, > > Tim.
Tim Deegan
2011-Dec-27 10:58 UTC
Re: mapping virtual address to corresponding shadow page in xen
Hi, At 16:26 +0330 on 24 Dec (1324744009), Mohamad Rezaei wrote:> My question is when I want to read a data from domain, I use > copy_from_guest. but now I want to map that address in domain (guest) > to an address inside xen (hypervisor). I need to translate that > address. somehow like this: gva -> gpfn -> gmfn -> mfn. To do this I > have started a dom0 with dom0_shadow=1 option. So I presume that vtx > is enabled for dom0.Actually shadow pagetables are quite separate from VT-x (and predate it - they were originally used for live migratoin of PV guests). So no, dom0_shadow=1 doesn''t turn on VT-x for dom0. Luckily, you don''t need VT-x to map a page of dom0 memory (in fact it wouldn''t help). Have a look at mem_event_enable() in xen/arch/x86/mm/mem_event.c - it does exactly wat you need, starting with VA ring_addr and ending with a mapping in med->ring_page. Cheers, Tim.
Possibly Parallel Threads
- question about xen memory management when shadow paging is enabled in Dom0!
- [PATCH 0/2] runstate_memory_area on ARM
- How do I force link_to/form helpers to use the superclass name in the path instead subclass?
- A problem with Intel VT / XEN3
- A problem with Intel VT / XEN3