We used to support KVM and VFIO style of PCI assignment. The
former was dropped in v5.7.0-rc1~103 and thus we only support
VFIO. All other backends lead to an error (see
qemuBuildPCIHostdevDevProps(), or qemuBuildPCIHostdevDevStr() as
it used to be called in the era of aforementioned commit).
Might as well report the error in prepare phase and save hassle
of proceeding with device preparation (e.g. in case of hotplug
overriding the device's driver, setting seclabels, etc.).
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
return false;
case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("QEMU does not support device assignment mode '%1$s'"),
+ virDomainHostdevSubsysPCIBackendTypeToString(*backend));
+ return false;
+
+ default:
case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST:
+ virReportEnumRangeError(virDomainHostdevSubsysPCIBackendType, *backend);
break;
}