render / rpms / libvirt

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