mirror of https://gitee.com/openkylin/libvirt.git
qemu: Don't fail without emulatorpin or cpumask
This unbreaks qemu:///session that got broken by
ba63d8f7d8
.
This commit is contained in:
parent
b7e9202401
commit
a605594f8e
|
@ -2037,12 +2037,14 @@ qemuProcessSetEmulatorAffinites(virConnectPtr conn,
|
|||
if (virNodeGetInfo(conn, &nodeinfo) != 0)
|
||||
return -1;
|
||||
|
||||
if (def->cputune.emulatorpin)
|
||||
if (def->cputune.emulatorpin) {
|
||||
cpumask = def->cputune.emulatorpin->cpumask;
|
||||
else if (def->cpumask)
|
||||
} else if (def->cpumask) {
|
||||
cpumask = def->cpumask;
|
||||
else
|
||||
} else {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = virProcessInfoSetAffinity(vm->pid, cpumask);
|
||||
cleanup:
|
||||
|
|
Loading…
Reference in New Issue