diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-04-08 19:10:33 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-04-08 19:10:33 +0100 |
commit | e4eff651ee91d38bd9c37312ca606652f8496af5 (patch) | |
tree | 748bb85731735d28617c8b516221261a2636a33c /tools | |
parent | 75c3d290f10b1b82bdec72ea803f76d22c4d4e8e (diff) | |
download | xen-e4eff651ee91d38bd9c37312ca606652f8496af5.tar.gz xen-e4eff651ee91d38bd9c37312ca606652f8496af5.tar.bz2 xen-e4eff651ee91d38bd9c37312ca606652f8496af5.zip |
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@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxc/xc_domain_restore.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c index 4f92ebb549..32782e1888 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -1197,7 +1197,7 @@ int xc_domain_restore(int xc_handle, int io_fd, uint32_t dom, * 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]; |