|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
Thank you Milos.
In /xen/arch/x86/mm.c I modified the following snippet./* First 1MB of RAM is historically marked as I/O : for ( i = 0; i < 0x100; i++ ) share_xen_page_with_guest(mfn_to_page(i), dom_io, XENSHARE_writable);
/* Any areas not specified as RAM by the e820 map are considered I/O. */ for ( i = 0, pfn = 0; pfn < max_page; i++ ) { while ( (i < e820.nr_map) && (e820.map[i].type != E820_RAM) && (e820.map[i].type != E820_UNUSABLE) && (e820.map[i].type != E820_MY_PCI))
Then this region will not be marked I/O and I can thereby use populate_physmap() instead of iomem_access_permitted(). Regions other than E820_RAM, E820_UNUSABLE, E820_MY_PCI will thus belong to DOMID_IO and will require I/O permissions to be mapped by DomUs. Is this perspective fine?
Thanks, Dinesh C
> Date: Tue, 1 Jul 2008 10:46:12 +0100 > From: gm281@xxxxxxxxx > To: dinesh_chan8@xxxxxxxxxxx > Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation > > > Okay. > > But I want to use 'I/O pages: memory in the memory mapped IO > > regions obtained by reading the BAR value from the pci device' > > as the 'real' memory for all DomUs since I have 256MB behind that device. > > The problem you'll have to face is the ownership model that Xen uses. > By default when RAM is allocated to a domain it is only accessible to > the domain itself + Dom0 (via foreign mapping mechanism). All non-RAM > ranges are allocated to a synthetic domain called dom_io. Any > pagetables that reference this memory are verified against the > permitted iomem range (look iomem_access_permitted()). By default > Dom0's access is permitted, so you are fine there. However, you'll > have to teach the domain build tools to recognise the difference > between RAM and MMIO (it might be as simple as patching > direct_remap_pfn_range in linux kernel to use DOMID_IO). Also, another > concern I'd have, is if the CPU will be happy to use MMIO for code and > stack segments. I don't know enough about that to answer. > > CHeers > Gr(z)egor(z)
Take the quiz. Crack your personality type. Get individualized suggestions for email ids that suit your personality.Log on to www.coolhotmail.com/personality.html Try it now!
Check news, cricket, entertainment and astrology right from your mobile. Browse http://m.msnindia.com from your GPRS mobile phone. Try it now!
|
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation,
dinesh chandrasekaran <=
|
|
|
|
|