a3bc25
From d260867d18aa20c4d79f4319b82453120d209eae Mon Sep 17 00:00:00 2001
a3bc25
Message-Id: <d260867d18aa20c4d79f4319b82453120d209eae@dist-git>
a3bc25
From: Jiri Denemark <jdenemar@redhat.com>
a3bc25
Date: Tue, 27 Jun 2017 15:06:10 +0200
a3bc25
Subject: [PATCH] qemu: Don't update CPU when checking ABI stability
a3bc25
a3bc25
When checking ABI stability between two domain definitions, we first
a3bc25
make migratable copies of them. However, we also asked for the guest CPU
a3bc25
to be updated, even though the updated CPU is supposed to be already
a3bc25
included in the original definitions. Moreover, if we do this on the
a3bc25
destination host during migration, we're potentially updating the
a3bc25
definition with according to an incompatible host CPU.
a3bc25
a3bc25
While updating the CPU when checking ABI stability doesn't make any
a3bc25
sense, it actually just worked because updating the CPU doesn't do
a3bc25
anything for custom CPUs (only host-model CPUs are affected) and we
a3bc25
updated both definitions in the same way.
a3bc25
a3bc25
Less then a year ago commit v2.3.0-rc1~42 stopped updating the CPU in
a3bc25
the definition we got internally and only the user supplied definition
a3bc25
was updated. However, the same commit started updating host-model CPUs
a3bc25
to custom CPUs which are not affected by the request to update the CPU.
a3bc25
So it still seemed to work right, unless a user upgraded libvirt 2.2.0
a3bc25
to a newer version while there were some domains with host-model CPUs
a3bc25
running on the host. Such domains couldn't be migrated with a user
a3bc25
supplied XML since libvirt would complain:
a3bc25
a3bc25
    Target CPU mode custom does not match source host-model
a3bc25
a3bc25
The fix is pretty straightforward, we just need to stop updating the CPU
a3bc25
when checking ABI stability.
a3bc25
a3bc25
https://bugzilla.redhat.com/show_bug.cgi?id=1463957
a3bc25
a3bc25
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
a3bc25
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
a3bc25
(cherry picked from commit ee68bb391efb684341edb6286a1278631167f08c)
a3bc25
a3bc25
https://bugzilla.redhat.com/show_bug.cgi?id=1470582
a3bc25
a3bc25
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
a3bc25
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
a3bc25
---
a3bc25
 src/qemu/qemu_domain.c | 1 -
a3bc25
 1 file changed, 1 deletion(-)
a3bc25
a3bc25
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
a3bc25
index 1528c6a137..6ccc9f6f5b 100644
a3bc25
--- a/src/qemu/qemu_domain.c
a3bc25
+++ b/src/qemu/qemu_domain.c
a3bc25
@@ -5910,7 +5910,6 @@ qemuDomainMigratableDefCheckABIStability(virQEMUDriverPtr driver,
a3bc25
 
a3bc25
 
a3bc25
 #define COPY_FLAGS (VIR_DOMAIN_XML_SECURE | \
a3bc25
-                    VIR_DOMAIN_XML_UPDATE_CPU | \
a3bc25
                     VIR_DOMAIN_XML_MIGRATABLE)
a3bc25
 
a3bc25
 bool
a3bc25
-- 
a3bc25
2.13.2
a3bc25