On Fri, Mar 13, 2020 at 16:46:16 +0000, Daniel Berrange wrote:
The logic for querying hotpluggable CPUs needs to sort the list
of CPUs returned by QEMU. Unfortunately our sorting method failed
to use the die_id field, so CPUs were not correctly sorted.
This is seen when configuring a guest with partially populated
CPUs
<vcpu placement='static' current='1'>16</vcpu>
<cpu...>
<topology sockets='4' dies='2' cores='1'
threads='2'/>
</cpu>
Then trying to start it would fail:
# virsh -c qemu:///system start demo
error: Failed to start domain demo
error: internal error: qemu didn't report thread id for vcpu '0'
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/qemu/qemu_domain.c | 10 ++++++++--
src/qemu/qemu_monitor.c | 2 ++
src/qemu/qemu_monitor.h | 2 ++
src/qemu/qemu_monitor_json.c | 4 ++++
4 files changed, 16 insertions(+), 2 deletions(-)
Please add a test entry to 'testQemuMonitorCPUInfo' test case for this
purpose. You'll need to extend testQemuMonitorCPUInfoFormat.
You can use:
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>
on this patch, but the test change should be reviewed separately and
also should go in together with this patch.