WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Other than native x86-64 code, the XEN guest *does* use

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Other than native x86-64 code, the XEN guest *does* use 4k mappings for
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 01 Jul 2005 11:50:12 -0400
Delivery-date: Fri, 01 Jul 2005 15:50:44 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Other than native x86-64 code, the XEN guest *does* use 4k mappings for, Xen patchbot -unstable <=