|
|
6d3351 |
From 9dcf5d0029fe9b1e1e17b20070702bc1ce6382ad Mon Sep 17 00:00:00 2001
|
|
|
6d3351 |
Message-Id: <9dcf5d0029fe9b1e1e17b20070702bc1ce6382ad@dist-git>
|
|
|
6d3351 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
6d3351 |
Date: Tue, 4 Apr 2017 09:31:20 +0200
|
|
|
6d3351 |
Subject: [PATCH] qemu: hotplug: Iterate over vcpu 0 in individual vcpu hotplug
|
|
|
6d3351 |
code
|
|
|
6d3351 |
|
|
|
6d3351 |
Buggy condition meant that vcpu0 would not be iterated in the checks.
|
|
|
6d3351 |
Since it's not hotpluggable anyways we would not be able to break the
|
|
|
6d3351 |
configuration of a live VM.
|
|
|
6d3351 |
|
|
|
6d3351 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1437013
|
|
|
6d3351 |
(cherry picked from commit 315f443dbb9f821fb207c30585e01dfbaac01878)
|
|
|
6d3351 |
---
|
|
|
6d3351 |
src/qemu/qemu_hotplug.c | 6 +++---
|
|
|
6d3351 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
6d3351 |
|
|
|
6d3351 |
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
|
|
|
6d3351 |
index de561da58..b5b520d8c 100644
|
|
|
6d3351 |
--- a/src/qemu/qemu_hotplug.c
|
|
|
6d3351 |
+++ b/src/qemu/qemu_hotplug.c
|
|
|
6d3351 |
@@ -5784,7 +5784,7 @@ qemuDomainSetVcpuConfig(virDomainDefPtr def,
|
|
|
6d3351 |
|
|
|
6d3351 |
def->individualvcpus = true;
|
|
|
6d3351 |
|
|
|
6d3351 |
- while ((next = virBitmapNextSetBit(map, next)) > 0) {
|
|
|
6d3351 |
+ while ((next = virBitmapNextSetBit(map, next)) >= 0) {
|
|
|
6d3351 |
if (!(vcpu = virDomainDefGetVcpu(def, next)))
|
|
|
6d3351 |
continue;
|
|
|
6d3351 |
|
|
|
6d3351 |
@@ -5817,7 +5817,7 @@ qemuDomainFilterHotplugVcpuEntities(virDomainDefPtr def,
|
|
|
6d3351 |
return NULL;
|
|
|
6d3351 |
|
|
|
6d3351 |
/* make sure that all selected vcpus are in the correct state */
|
|
|
6d3351 |
- while ((next = virBitmapNextSetBit(map, next)) > 0) {
|
|
|
6d3351 |
+ while ((next = virBitmapNextSetBit(map, next)) >= 0) {
|
|
|
6d3351 |
if (!(vcpu = virDomainDefGetVcpu(def, next)))
|
|
|
6d3351 |
continue;
|
|
|
6d3351 |
|
|
|
6d3351 |
@@ -5837,7 +5837,7 @@ qemuDomainFilterHotplugVcpuEntities(virDomainDefPtr def,
|
|
|
6d3351 |
/* Make sure that all vCPUs belonging to a single hotpluggable entity were
|
|
|
6d3351 |
* selected and then de-select any sub-threads of it. */
|
|
|
6d3351 |
next = -1;
|
|
|
6d3351 |
- while ((next = virBitmapNextSetBit(map, next)) > 0) {
|
|
|
6d3351 |
+ while ((next = virBitmapNextSetBit(map, next)) >= 0) {
|
|
|
6d3351 |
if (!(vcpu = virDomainDefGetVcpu(def, next)))
|
|
|
6d3351 |
continue;
|
|
|
6d3351 |
|
|
|
6d3351 |
--
|
|
|
6d3351 |
2.12.2
|
|
|
6d3351 |
|