[libvirt] [PATCH 3/3] qemu: Don't skip detection of virtual cpu's on non KVM targets

Peter Krempa pkrempa at redhat.com
Mon May 7 12:16:22 UTC 2012


QEMU adapted the info cpus command from the kvm branch. This patch
removes the check for the KVM domain type to detect virtualprocessors
also while using software emulation.

The output of the "info cpus" command may vary across different targets
but informations that are parsed by libvirt (cpu ID and thread pid) are
(should be) present on those other targets too.
---
 src/qemu/qemu_process.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index f1401e1..b25cecb 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1613,18 +1613,6 @@ qemuProcessDetectVcpuPIDs(struct qemud_driver *driver,
     int ncpupids;
     qemuDomainObjPrivatePtr priv = vm->privateData;

-    if (vm->def->virtType != VIR_DOMAIN_VIRT_KVM) {
-        priv->nvcpupids = 1;
-        if (VIR_ALLOC_N(priv->vcpupids, priv->nvcpupids) < 0) {
-            virReportOOMError();
-            return -1;
-        }
-        priv->vcpupids[0] = vm->pid;
-        return 0;
-    }
-
-    /* What follows is now all KVM specific */
-
     qemuDomainObjEnterMonitorWithDriver(driver, vm);
     if ((ncpupids = qemuMonitorGetCPUInfo(priv->mon, &cpupids)) < 0) {
         qemuDomainObjExitMonitorWithDriver(driver, vm);
-- 
1.7.3.4




More information about the libvir-list mailing list