[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Other than native x86-64 code, the XEN guest *does* use 4k mappings for
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 4b06e1c365fc1fa9f20a27acb23f5dcc7fe2a8d0 # Parent adda79dcd0e3234532b820be93ddde7730a0c0b4 Other than native x86-64 code, the XEN guest *does* use 4k mappings for the contiguous kernel mapping of (physical) memory. Thus the code in change_page_attr needs to work like on i386 (where large pages are used only conditionally) rather than like native x86-64. Patch below/attached. Not doing so triggered the BUG_ON during load of intel-agp on machines with i915 chipset. Signed-off-by: Jan Beulich <JBeulich@xxxxxxxxxx> diff -r adda79dcd0e3 -r 4b06e1c365fc linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/pageattr.c --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/pageattr.c Fri Jul 1 15:46:41 2005 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/pageattr.c Fri Jul 1 15:47:46 2005 @@ -166,16 +166,23 @@ BUG(); /* on x86-64 the direct mapping set at boot is not using 4k pages */ - BUG_ON(PageReserved(kpte_page)); - - switch (page_count(kpte_page)) { - case 1: - save_page(address, kpte_page); - revert_page(address, ref_prot); - break; - case 0: - BUG(); /* memleak and failed 2M page regeneration */ - } +// BUG_ON(PageReserved(kpte_page)); + /* + * ..., but the XEN guest kernels (currently) do: + * If the pte was reserved, it means it was created at boot + * time (not via split_large_page) and in turn we must not + * replace it with a large page. + */ + if (!PageReserved(kpte_page)) { + switch (page_count(kpte_page)) { + case 1: + save_page(address, kpte_page); + revert_page(address, ref_prot); + break; + case 0: + BUG(); /* memleak and failed 2M page regeneration */ + } + } return 0; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |