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] restore: sign extend p2m when restoring o

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] restore: sign extend p2m when restoring on a host with pfn width <
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 09 Apr 2009 23:00:23 -0700
Delivery-date: Thu, 09 Apr 2009 23:01:13 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1239214233 -3600
# Node ID a6003404e95b77d28a9dbc1550c34e9c6ba5e871
# Parent  f9c8c6b0897274ffb682b259b794dde07cb2d8a5
restore: sign extend p2m when restoring on a host with pfn width <
guest pfn width

(i.e. 32on64 domain 0 and 64 bit guest domain).

Otherwise P2M entries which were INVALID_P2M_ENTRY
(==0xffffffffffffffff) become 0xffffffff after a migrate.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxc/xc_domain_restore.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r f9c8c6b08972 -r a6003404e95b tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c   Wed Apr 08 14:43:12 2009 +0100
+++ b/tools/libxc/xc_domain_restore.c   Wed Apr 08 19:10:33 2009 +0100
@@ -1197,7 +1197,7 @@ int xc_domain_restore(int xc_handle, int
      * we need to adjust the live_p2m assignment appropriately */
     if ( guest_width > sizeof (xen_pfn_t) )
         for ( i = p2m_size - 1; i >= 0; i-- )
-            ((uint64_t *)live_p2m)[i] = p2m[i];
+            ((int64_t *)live_p2m)[i] = (long)p2m[i];
     else if ( guest_width < sizeof (xen_pfn_t) )
         for ( i = 0; i < p2m_size; i++ )   
             ((uint32_t *)live_p2m)[i] = p2m[i];

_______________________________________________
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] restore: sign extend p2m when restoring on a host with pfn width <, Xen patchbot-unstable <=