diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4c45fc3b4fbdcea4f1ff952f0bd587b7c4945b1d..f8fc47d379f5ad46b957371e6200fdab90e07b4d 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5171,8 +5171,9 @@ qemuDomainGetVcpuPinInfo(virDomainPtr dom, { virDomainObjPtr vm = NULL; virDomainDefPtr def; + bool live; int ret = -1; - qemuDomainObjPrivatePtr priv = NULL; + virBitmapPtr autoCpuset = NULL; virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1); @@ -5183,14 +5184,14 @@ qemuDomainGetVcpuPinInfo(virDomainPtr dom, if (virDomainGetVcpuPinInfoEnsureACL(dom->conn, vm->def) < 0) goto cleanup; - if (!(def = virDomainObjGetOneDef(vm, flags))) + if (!(def = virDomainObjGetOneDefState(vm, flags, &live))) goto cleanup; - priv = vm->privateData; + if (live) + autoCpuset = QEMU_DOMAIN_PRIVATE(vm)->autoCpuset; ret = virDomainDefGetVcpuPinInfoHelper(def, maplen, ncpumaps, cpumaps, - virHostCPUGetCount(), - priv->autoCpuset); + virHostCPUGetCount(), autoCpuset); cleanup: virDomainObjEndAPI(&vm); return ret;