[libvirt] [PATCH] qemu: process: Save vcpu ordering information on reconnect

Peter Krempa posted 1 patch 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/ad3c6b229bcc91177db29d307e8ccc22c6c43565.1496728216.git.pkrempa@redhat.com
src/qemu/qemu_process.c | 2 ++
1 file changed, 2 insertions(+)
[libvirt] [PATCH] qemu: process: Save vcpu ordering information on reconnect
Posted by Peter Krempa 6 years, 10 months ago
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
---
 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 be031b56b..32ba8e373 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.12.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: process: Save vcpu ordering information on reconnect
Posted by Ján Tomko 6 years, 10 months ago
On Tue, Jun 06, 2017 at 07:50:16AM +0200, Peter Krempa wrote:
>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
>---
> src/qemu/qemu_process.c | 2 ++
> 1 file changed, 2 insertions(+)
>

Really-reviewed-by: Ján Tomko <jtomko@redhat.com>

Jan
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list