From 8df453dfaafbd0001dcdc828eb8b2479b61dc74b Mon Sep 17 00:00:00 2001
Message-Id: <8df453dfaafbd0001dcdc828eb8b2479b61dc74b@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Tue, 6 Jun 2017 12:28:01 +0200
Subject: [PATCH] qemu: process: Save vcpu ordering information on reconnect
vCPU ordering information would not be updated if a vCPU emerged or
disappeared during the time libvirtd is not running. This allowed to
create invalid configuration like:
[...]
<vcpu id='56' enabled='yes' hotpluggable='yes' order='57'/>
<vcpu id='57' enabled='yes' hotpluggable='yes' order='58'/>
<vcpu id='58' enabled='yes' hotpluggable='yes'/>
Call the function that records the information on reconnect.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1451251
(cherry picked from commit ad3c6b229bcc91177db29d307e8ccc22c6c43565)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/qemu/qemu_process.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 998dbeb6b5..7e51ca819a 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3492,6 +3492,8 @@ qemuProcessReconnect(void *opaque)
if (qemuDomainRefreshVcpuInfo(driver, obj, QEMU_ASYNC_JOB_NONE, true) < 0)
goto error;
+ qemuDomainVcpuPersistOrder(obj->def);
+
if (qemuSecurityReserveLabel(driver->securityManager, obj->def, obj->pid) < 0)
goto error;
--
2.13.1