qemu_command: Don't validate accelerator when building cmd line

The domain accelerator was validated in qemuValidateDomainDef()
which calls virQEMUCapsIsVirtTypeSupported() which reports proper
error if QEMU is not capable of KVM/TCG. There is no point in
doing the validation again when building command line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Kashyap Chamarthy <kchamart@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Michal Privoznik 2021-11-05 09:33:45 +01:00
parent d5643e73da
commit 69f2f63299

View File

@ -7066,15 +7066,8 @@ qemuBuildMachineCommandLine(virCommand *cmd,
case VIR_DOMAIN_VIRT_BHYVE:
case VIR_DOMAIN_VIRT_VZ:
case VIR_DOMAIN_VIRT_NONE:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("the QEMU binary does not support %s"),
virDomainVirtTypeToString(def->virtType));
return -1;
case VIR_DOMAIN_VIRT_LAST:
default:
virReportEnumRangeError(virDomainVirtType, def->virtType);
return -1;
break;
}
/* To avoid the collision of creating USB controllers when calling