[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix mach2phys table allocation for 32-bit PAE Xen.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 69b7c9c3a9fdf22d840132f274f3fa64101a0ed0 # Parent b63577ff53a3161ac73b55e0aa87803e76c8bde5 Fix mach2phys table allocation for 32-bit PAE Xen. Found by Gerd Knorr. diff -r b63577ff53a3 -r 69b7c9c3a9fd xen/arch/x86/x86_32/mm.c --- a/xen/arch/x86/x86_32/mm.c Fri Aug 5 14:57:43 2005 +++ b/xen/arch/x86/x86_32/mm.c Fri Aug 5 15:11:46 2005 @@ -98,8 +98,10 @@ * installed, but at least 4MB to cover 4GB address space. This is needed * to make PCI I/O memory address lookups work in guests. */ - if ( (mpt_size = max_page * 4) < (4*1024*1024) ) - mpt_size = 4*1024*1024; + mpt_size = (max_page * 4) + (1UL << L2_PAGETABLE_SHIFT) - 1UL; + mpt_size &= ~((1UL << L2_PAGETABLE_SHIFT) - 1UL); + if ( mpt_size < (4 << 20) ) + mpt_size = 4 << 20; for ( i = 0; i < (mpt_size >> L2_PAGETABLE_SHIFT); i++ ) { if ( (pg = alloc_domheap_pages(NULL, PAGETABLE_ORDER, 0)) == NULL ) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |