]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu_command: Don't validate accelerator when building cmd line
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 5 Nov 2021 08:33:45 +0000 (09:33 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 22 Nov 2021 12:06:54 +0000 (13:06 +0100)
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>
src/qemu/qemu_command.c

index 80adf5b716af973b3670090af4beff2c1731e782..c15fd360a2448a69e3a56be47df4d1e539a6b6e9 100644 (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