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] [xen-unstable] [XEN] [TOOLS] 32on64 compat save/restore:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] [TOOLS] 32on64 compat save/restore: unadjust L3E flags at save time
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Feb 2007 09:50:38 -0800
Delivery-date: Fri, 23 Feb 2007 09:51:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
# Date 1172235500 0
# Node ID 8bcaedc68f5a0ba773d789f45f7ec578cd7d7c76
# Parent  cdc765772f692f2e8cf53cdada703adac24e5af0
[XEN] [TOOLS] 32on64 compat save/restore: unadjust L3E flags at save time
Get rid of USER|RW|ACCESSED L3 PTE flags which may be present
in a PAE guest when running on a 64bit hypervisor at save time.
This prevents the restore operation from getting confused by
these flags.
Reset disallowed L3E flags to match PAE case.

Signed-off-by: Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
---
 tools/libxc/xc_linux_save.c       |   12 ++++++++++++
 xen/include/asm-x86/x86_64/page.h |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff -r cdc765772f69 -r 8bcaedc68f5a tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Fri Feb 23 11:32:25 2007 +0000
+++ b/tools/libxc/xc_linux_save.c       Fri Feb 23 12:58:20 2007 +0000
@@ -543,6 +543,18 @@ static int canonicalize_pagetable(unsign
 
             pte &= ~MADDR_MASK_X86;
             pte |= (uint64_t)pfn << PAGE_SHIFT;
+
+            /*
+             * PAE guest L3Es can contain these flags when running on
+             * a 64bit hypervisor. We zap these here to avoid any
+             * surprise at restore time...
+             */
+            if ( pt_levels == 3 &&
+                 type == XEN_DOMCTL_PFINFO_L3TAB &&
+                 pte & (_PAGE_USER|_PAGE_RW|_PAGE_ACCESSED) )
+            {
+                pte &= ~(_PAGE_USER|_PAGE_RW|_PAGE_ACCESSED);
+            }
         }
 
         if (pt_levels == 2)
diff -r cdc765772f69 -r 8bcaedc68f5a xen/include/asm-x86/x86_64/page.h
--- a/xen/include/asm-x86/x86_64/page.h Fri Feb 23 11:32:25 2007 +0000
+++ b/xen/include/asm-x86/x86_64/page.h Fri Feb 23 12:58:20 2007 +0000
@@ -98,7 +98,7 @@ typedef l4_pgentry_t root_pgentry_t;
 #define L3_DISALLOW_MASK (BASE_DISALLOW_MASK)
 #define L4_DISALLOW_MASK (BASE_DISALLOW_MASK)
 
-#define COMPAT_L3_DISALLOW_MASK L3_DISALLOW_MASK
+#define COMPAT_L3_DISALLOW_MASK 0xFFFFF1E6U
 
 #define PAGE_HYPERVISOR         (__PAGE_HYPERVISOR         | _PAGE_GLOBAL)
 #define PAGE_HYPERVISOR_NOCACHE (__PAGE_HYPERVISOR_NOCACHE | _PAGE_GLOBAL)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] [TOOLS] 32on64 compat save/restore: unadjust L3E flags at save time, Xen patchbot-unstable <=