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-devel

[Xen-devel] [PATCH] xen: allow HVM save/restore from different cpus

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xen: allow HVM save/restore from different cpus
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Thu, 8 Jul 2010 12:21:52 +0100
Delivery-date: Thu, 08 Jul 2010 04:22:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
The hardware CPUID-levelling features level the feature flags but don't
change the CPU family/model/stepping.  Relax the HVM restore check on 
family/model/stepping to printk but not veto the load, so that VMs can 
be migrated between machines that have been CPUID-levelled.  

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

diff -r 281896d3343a xen/arch/x86/hvm/save.c
--- a/xen/arch/x86/hvm/save.c   Thu Jul 08 12:07:16 2010 +0100
+++ b/xen/arch/x86/hvm/save.c   Thu Jul 08 12:10:59 2010 +0100
@@ -55,10 +55,11 @@
     }
 
     cpuid(1, &eax, &ebx, &ecx, &edx);
-    /* TODO: need to define how big a difference is acceptable? */
-    if ( hdr->cpuid != eax )
-        gdprintk(XENLOG_WARNING, "HVM restore: saved CPUID (%#"PRIx32") "
-               "does not match host (%#"PRIx32").\n", hdr->cpuid, eax);
+    /* CPUs ought to match but with feature-masking they might not */
+    if ( (hdr->cpuid & ~0x0fUL) != (eax & ~0x0fUL) )
+        gdprintk(XENLOG_INFO, "HVM restore (%u): VM saved on one CPU "
+                 "(%#"PRIx32") and restored on another (%#"PRIx32").\n", 
+                 d->domain_id, hdr->cpuid, eax);
 
     /* Restore guest's preferred TSC frequency. */
     if ( hdr->gtsc_khz )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xen: allow HVM save/restore from different cpus, Tim Deegan <=