]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cpu: Don't update host-model guest CPUs on ppc64
authorAndrea Bolognani <abologna@redhat.com>
Thu, 13 Aug 2015 11:40:12 +0000 (13:40 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 21 Aug 2015 21:51:31 +0000 (14:51 -0700)
If a guest CPU is defined using

  <cpu mode='host-model'/>

the <model> sub-element will contain the compatibility mode to use.
That means we can't just copy the host CPU model on cpuUpdate(),
otherwise we'll overwrite that information and migration of such
guests will fail.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1251927

src/cpu/cpu_ppc64.c

index 85aa5bcb31de92436f14503ccbef72f1c19bcfb7..72b8fa05a366724a80900599beca1b16baa30ab2 100644 (file)
@@ -667,13 +667,13 @@ ppc64DriverUpdate(virCPUDefPtr guest,
                   const virCPUDef *host)
 {
     switch ((virCPUMode) guest->mode) {
-    case VIR_CPU_MODE_HOST_MODEL:
     case VIR_CPU_MODE_HOST_PASSTHROUGH:
         guest->match = VIR_CPU_MATCH_EXACT;
         guest->fallback = VIR_CPU_FALLBACK_FORBID;
         virCPUDefFreeModel(guest);
         return virCPUDefCopyModel(guest, host, true);
 
+    case VIR_CPU_MODE_HOST_MODEL:
     case VIR_CPU_MODE_CUSTOM:
         return 0;