mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
qemu: Forbid pinning vCPUs for TCG domain
We don't support cpu pinning for TCG domains because QEMU runs them in one thread only. But vcpupin command was able to set them, which resulted in a failed startup, so make sure that doesn't happen. Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
This commit is contained in:
parent
dc67d00cd2
commit
8b035c84d8
@ -5189,6 +5189,13 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
|
||||
if (virDomainObjGetDefs(vm, flags, &def, &persistentDef) < 0)
|
||||
goto endjob;
|
||||
|
||||
if ((def && def->virtType == VIR_DOMAIN_VIRT_QEMU) ||
|
||||
(persistentDef && persistentDef->virtType == VIR_DOMAIN_VIRT_QEMU)) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("Virt type 'qemu' does not support vCPU pinning"));
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (persistentDef &&
|
||||
!(vcpuinfo = virDomainDefGetVcpu(persistentDef, vcpu))) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
|
Loading…
Reference in New Issue
Block a user