Xen - Guest memory allocation
Thanks MIlos,This was really helpful.
Quoted 1 line
You can then allow> DomU to use specific ranges of IO memory using>
XEN_DOMCTL_iomem_permission. Have a look how tools do it, when> assigning a PCI device to a DomU:>tools/python/xen/xend/server/pciif.py
But let the Dom0 take care of I/O pages for all DomUs (hope this is the default).
I'm just trying for the making Memory pages and NOT I/O pages for all DomUs available from the my_pci address range using populate_physmap().
Quoted 1 line
You do need 'real' memory to be assigned to DomU.
Yeah. That is the reason why I used maddr_to_page() macro;
I assume that xen uses populate_physmap() to allocate 'real' memory for all DomUs. Is my assumption wrong?
Thanks,
Dinesh C
Quoted 20 lines
Date: Mon, 30 Jun 2008 13:52:26 +0100
From: [email protected]
To: [email protected]
Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
CC: [email protected]; [email protected]Quoted 4 lines
Yes, about the I/O pages,
my machine uses 36-bit physical addresses,
since PCI address are all 32-bit, Im facing difficulties in converting these addresses into pages usingmaddr_to_page();The bit widths are not the (main) problem!
I don't think that patchingpopulate_physmapis the right approach. You do need 'real' memory to be assigned to DomU. You can then allow DomU to use specific ranges of IO memory usingXEN_DOMCTL_iomem_permission. Have a look how tools do it, when assigning a PCI device to a DomU:tools/python/xen/xend/server/pciif.py
Quoted 87 lines
Cheers
Gr(z)egor(z)Quoted 85 lines
So, I have to use a 64-bit PCI device.
Thanks Milos,
Dinesh CQuoted 56 lines
Date: Sat, 28 Jun 2008 16:50:48 +0100
From: [email protected]
To: [email protected]
Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
CC: [email protected]; [email protected]; [email protected]Quoted 17 lines
Hi,
if I use the following inside the
populate_physmap()insidexen/common/memory.c,unsigned long
maddr_pci=0xdf000000; //since I know the machine address of the mememory behind my pci device <xm dmesg>static void
populate_physmap(struct memop_args *a){
/******
for(i=a->nr_done; i<a->nr_extents; i++)
{
/*************
&nb sp;if(d->is_privilaged)Quoted 5 lines
page =
alloc_domheap_pages(d, a->extent_order, a->memflags | MEMF_node(node));
else
{
page =maddr_to_page(maddr_pci);This is going to assign DomU IO pages _only_.
Quoted 1 line
maddr_pci= ((maddr + PAGE_SIZE-1)&PAGE_MASK);What is maddr here? Did you mean
maddr_pci? Also, (page_aligned_x+PAGE_SIZE- 1) &PAGE_MASK=page_aligned_x, in other words you are stuck on the same page.Quoted 18 lines
`   ; }
/***************
}printk('a->nr_done: %lx', a->nr_done);
}The printk says '
a->nr_done: 2000' when 'xm dmesg' is used (which is correct
since I allocated 32MB for DomU = 8192 pages =0x2000)but exits with the following error:
& n bsp; 'dmesg' says : Using config file '
/home/guest/Guest.conf'.
Error: (1, 'Internal error', 'xc_dom_boot_domU_map:
failed to mmap domU pages 0x200+0x2e3 [xenctl, rc=-1]\n'Quoted 8 lines
Quoted 2 lines
'xm dmesg' says: <G><1>mm.c:671:d0 Non-privileged (1) attempt to map I/O space
000df1ffDom0 tried map DomU memory in order to load the kernel + other boot info. This fails because you've only allocated IO pages to DomU.
Cheers
Gr(z)egor(z)________________________________
Live.in : Get your [email protected] email id today. Powered by Windows Live Hotmail. Check it out!________________________________
WL Messenger : Stay connected to friends and family with the New Windows Live Messenger. Get it now. Try it now!
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_________________________________________________________________
No Harvard, No Oxford. We are here. Find out !!
http://ss1.richmedia.in/recurl.asp?pid=500
_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users