[libvirt PATCH] qemu: fix detection of vCPU pids when multiple dies are present
Daniel P. Berrangé
berrange at redhat.com
Mon Mar 16 13:06:47 UTC 2020
On Mon, Mar 16, 2020 at 09:53:13AM +0100, Peter Krempa wrote:
> 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 at 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.
That test suite doesn't illustrate the brokenness AFAICT. I added
the data files and it still passes, even without the fix.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list