|
|
c1c534 |
From 267d4074f4c6a543643e1fe8cd726953273a5bc6 Mon Sep 17 00:00:00 2001
|
|
|
c1c534 |
Message-Id: <267d4074f4c6a543643e1fe8cd726953273a5bc6@dist-git>
|
|
|
c1c534 |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c1c534 |
Date: Wed, 10 Jan 2018 15:56:21 +0100
|
|
|
c1c534 |
Subject: [PATCH] qemu: Ignore fallback CPU attribute on reconnect
|
|
|
c1c534 |
|
|
|
c1c534 |
When reconnecting to a running domain with host-model CPU started by old
|
|
|
c1c534 |
libvirt which did not store the actual CPU in the status XML, we need to
|
|
|
c1c534 |
ignore the fallback attribute to make sure we can translate the detected
|
|
|
c1c534 |
host CPU model to a model which is supported by the running QEMU.
|
|
|
c1c534 |
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1532980
|
|
|
c1c534 |
|
|
|
c1c534 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c1c534 |
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c1c534 |
(cherry picked from commit 237f045d9a9d84a52e645b490d14ad0b66e5b8ed)
|
|
|
c1c534 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c1c534 |
---
|
|
|
c1c534 |
src/qemu/qemu_process.c | 5 +++++
|
|
|
c1c534 |
1 file changed, 5 insertions(+)
|
|
|
c1c534 |
|
|
|
c1c534 |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
c1c534 |
index 701528c42c..c64088e4ca 100644
|
|
|
c1c534 |
--- a/src/qemu/qemu_process.c
|
|
|
c1c534 |
+++ b/src/qemu/qemu_process.c
|
|
|
c1c534 |
@@ -3884,6 +3884,11 @@ qemuProcessUpdateCPU(virQEMUDriverPtr driver,
|
|
|
c1c534 |
virDomainCapsCPUModelsPtr models = NULL;
|
|
|
c1c534 |
int ret = -1;
|
|
|
c1c534 |
|
|
|
c1c534 |
+ /* The host CPU model comes from host caps rather than QEMU caps so
|
|
|
c1c534 |
+ * fallback must be allowed no matter what the user specified in the XML.
|
|
|
c1c534 |
+ */
|
|
|
c1c534 |
+ vm->def->cpu->fallback = VIR_CPU_FALLBACK_ALLOW;
|
|
|
c1c534 |
+
|
|
|
c1c534 |
if (qemuProcessFetchGuestCPU(driver, vm, asyncJob, &cpu, &disabled) < 0)
|
|
|
c1c534 |
goto cleanup;
|
|
|
c1c534 |
|
|
|
c1c534 |
--
|
|
|
c1c534 |
2.15.1
|
|
|
c1c534 |
|