xen: allow HVM save/restore from different cpus
PATCH 1/1 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 <[email protected]>
xen/arch/x86/hvm/save.c +5 -4
@@ -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 )