xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Accessing Dom0 Physical memory from xen, via direct mappings (PML4:262-271)
@ 2012-03-13 15:45 Shriram Rajagopalan
  2012-03-13 16:08 ` Tim Deegan
  0 siblings, 1 reply; 7+ messages in thread
From: Shriram Rajagopalan @ 2012-03-13 15:45 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

In config.h (include/asm-x86/config.h) I found this:

#if __x86_64__
...
 *  0xffff830000000000 - 0xffff87ffffffffff [5TB, 5*2^40 bytes, PML4:262-271]                                                                                                                                                                                 
 *    1:1 direct mapping of all physical memory.                   
...

I was wondering if it's possible for dom0 to malloc a huge chunk of memory 
and let xen know the starting address of this range. 
Inside xen, I can translate dom0 virt address to a virt address in the above 
range and access the entire chunk via these virtual addresses.

The catch here is that I want this virtual address range to be accessible 
across all vcpu contexts in xen (whether it's servicing a hypercall from dom0
or a vmx fault caused by Guest).

So far, I have only been able to achieve the former. In the latter case,
where the "current" vcpu belongs to a guest (eg in a vmx fault handler),
I can't access this address range inside xen. Do I have to add EPT
mappings to guest's p2m to do this ? Or can I do something else ?


thanks
shriram

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-14  9:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.6174.1331656614.1471.xen-devel@lists.xen.org>
2012-03-13 18:13 ` Accessing Dom0 Physical memory from xen, via direct mappings (PML4:262-271) Andres Lagar-Cavilla
2012-03-13 15:45 Shriram Rajagopalan
2012-03-13 16:08 ` Tim Deegan
2012-03-13 16:32   ` Shriram Rajagopalan
2012-03-13 16:43     ` Tim Deegan
2012-03-14  3:04       ` Shriram Rajagopalan
2012-03-14  9:00         ` Tim Deegan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).