mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 08:05:16 +00:00
qemu: Don't strictly require JSON monitor for vCPU detection
Attaching to a existing qemu process allows to get us into a situation when qemu is new enough to have JSON monitor and new vCPU hotplug but the json monitor is not used. The vCPU detection code would require it though. This broke attaching to qemu processes. Make the condition less strict and just skip the vCPU hotplug detection if JSON monitor is not available. Resolves one of the symptoms in: https://bugzilla.redhat.com/show_bug.cgi?id=1378401
This commit is contained in:
parent
1dcbb27402
commit
62135ff692
@ -1898,14 +1898,14 @@ qemuMonitorGetCPUInfo(qemuMonitorPtr mon,
|
||||
int rc;
|
||||
qemuMonitorCPUInfoPtr info = NULL;
|
||||
|
||||
if (hotplug)
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
else
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
if (VIR_ALLOC_N(info, maxvcpus) < 0)
|
||||
return -1;
|
||||
|
||||
if (!mon->json)
|
||||
hotplug = false;
|
||||
|
||||
/* initialize a few non-zero defaults */
|
||||
qemuMonitorCPUInfoClear(info, maxvcpus);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user