aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-07-09 12:44:33 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-07-09 12:44:33 +0100
commit827e2c04109d83767595600ee4080ba96672229b (patch)
tree16d0cc259e80127194e54f8a9b1fc8db860826b9
parent9d6e1ed14f7bc88fec13c424c6fbeae3f2e8bb54 (diff)
downloadxen-827e2c04109d83767595600ee4080ba96672229b.tar.gz
xen-827e2c04109d83767595600ee4080ba96672229b.tar.bz2
xen-827e2c04109d83767595600ee4080ba96672229b.zip
xen: allow HVM save/restore from different cpus
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@citrix.com> xen-unstable changeset: 21759:8b2453940dac xen-unstable date: Fri Jul 09 12:22:35 2010 +0100
-rw-r--r--xen/arch/x86/hvm/save.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c
index 3fc24a0263..bc1b51647c 100644
--- a/xen/arch/x86/hvm/save.c
+++ b/xen/arch/x86/hvm/save.c
@@ -55,10 +55,11 @@ int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr)
}
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 )