[libvirt] [PATCH 2/6] qemu: use query-cpus-fast in JSON monitor
Peter Krempa
pkrempa at redhat.com
Fri Mar 2 12:41:17 UTC 2018
On Fri, Mar 02, 2018 at 13:32:19 +0100, Viktor Mihajlovski wrote:
> On 02.03.2018 12:33, Peter Krempa wrote:
> [...]
> >> @@ -2028,8 +2029,12 @@ qemuMonitorGetCPUInfo(qemuMonitorPtr mon,
> >> (qemuMonitorJSONGetHotpluggableCPUs(mon, &hotplugcpus, &nhotplugcpus)) < 0)
> >> goto cleanup;
> >>
> >> + fast = virQEMUCapsGet(QEMU_DOMAIN_PRIVATE(mon->vm)->qemuCaps,
> >
> > Don't do this. You'll need to determine it sooner. The main reason being
> > that once you are in the monitor code, 'vm' is unlocked and should not
> > be accesssed. Also we don't access the VM object trhough the mon object
> > usually.
> > OK. I've been struggling over this part since the availability of
> query-cpus-fast is tied to the QEMU instance and I didn't want to
> duplicate the capability in the qemuMonitor struct. Looks like I have to ...
You can pass it from the caller as we do in more than one place.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180302/2478918c/attachment-0001.sig>
More information about the libvir-list
mailing list