From: Michal Privoznik Date: Fri, 5 Nov 2021 08:33:45 +0000 (+0100) Subject: qemu_command: Don't validate accelerator when building cmd line X-Git-Tag: v7.10.0-rc1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69f2f632994c8f8b51f0d0e4be0f674054619654;p=thirdparty%2Flibvirt.git 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 Tested-by: Kashyap Chamarthy Reviewed-by: Peter Krempa --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 80adf5b716..c15fd360a2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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