On 05/11/2012 07:23 AM, Peter Krempa wrote: > After a cpu hotplug the qemu driver did not refresh information about > virtual processors used by qemu and their corresponding threads. This > patch forces a re-detection as is done on start of QEMU. > > This ensures that correct information is reported by the > virDomainGetVcpus API and "virsh vcpuinfo". > > A failure to obtain the thread<->vcpu mapping is treated non-fatal and > the mapping is not updated in a case of failure as not all versions of > QEMU report this in the info cpus command. > --- > Diff to v1: > - don't fail the call if cpu thread detection fails > - fix memory leak when overwriting the priv->vcpupids array > --- > src/qemu/qemu_driver.c | 29 +++++++++++++++++++++++++++++ > 1 files changed, 29 insertions(+), 0 deletions(-) > > @@ -3373,11 +3375,38 @@ static int qemudDomainHotplugVcpus(struct qemud_driver *driver, > } > } > > + /* hotplug succeeded */ > + > ret = 0; > > + /* After hotplugging the CPUs we need to re-detect threads corresponding > + * to the virtual CPUs. Some older versions don't provide the thread ID > + * or don't have the "info cpus" (and they don't support mutliple CPUs s/mutliple/multiple/ > + * anyways) command, so errors in the re-detection will not be treated s/"info cpus" (...) command/"info cpus" command (...)/ ACK with comment fix. -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list