mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
qemu: capabilities: Retire QEMU_CAPS_MACHINE_IOMMU
The feature is no longer asserted. Remove the checks related to it and make the code work properly with QEMU_CAPS_DEVICE_INTEL_IOMMU. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
fb292c659f
commit
8628689eda
@ -373,7 +373,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
||||
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, /* virtio-*pci.disable-legacy */
|
||||
QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS, /* qmp command query-hotpluggable-cpus */
|
||||
QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE, /* virtio-net-*.rx_queue_size */
|
||||
QEMU_CAPS_MACHINE_IOMMU, /* -machine iommu=on */
|
||||
X_QEMU_CAPS_MACHINE_IOMMU, /* -machine iommu=on */
|
||||
|
||||
/* 235 */
|
||||
QEMU_CAPS_DEVICE_VIRTIO_VGA, /* -device virtio-vga */
|
||||
|
@ -6245,8 +6245,7 @@ qemuBuildBootCommandLine(virCommand *cmd,
|
||||
|
||||
static int
|
||||
qemuBuildIOMMUCommandLine(virCommand *cmd,
|
||||
const virDomainDef *def,
|
||||
virQEMUCaps *qemuCaps)
|
||||
const virDomainDef *def)
|
||||
{
|
||||
const virDomainIOMMUDef *iommu = def->iommu;
|
||||
|
||||
@ -6257,13 +6256,6 @@ qemuBuildIOMMUCommandLine(virCommand *cmd,
|
||||
case VIR_DOMAIN_IOMMU_MODEL_INTEL: {
|
||||
g_auto(virBuffer) opts = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
/* qemuValidateDomainDeviceDefIOMMU() already made sure we have
|
||||
* one of QEMU_CAPS_DEVICE_INTEL_IOMMU or QEMU_CAPS_MACHINE_IOMMU:
|
||||
* here we handle the former case, while the latter is taken care
|
||||
* of in qemuBuildMachineCommandLine() */
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_INTEL_IOMMU))
|
||||
return 0;
|
||||
|
||||
virBufferAddLit(&opts, "intel-iommu");
|
||||
if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||
virBufferAsprintf(&opts, ",intremap=%s",
|
||||
@ -6904,12 +6896,7 @@ qemuBuildMachineCommandLine(virCommand *cmd,
|
||||
if (def->iommu) {
|
||||
switch (def->iommu->model) {
|
||||
case VIR_DOMAIN_IOMMU_MODEL_INTEL:
|
||||
/* qemuValidateDomainDeviceDefIOMMU() already made sure we have
|
||||
* one of QEMU_CAPS_DEVICE_INTEL_IOMMU or QEMU_CAPS_MACHINE_IOMMU:
|
||||
* here we handle the latter case, while the former is taken care
|
||||
* of in qemuBuildIOMMUCommandLine() */
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_IOMMU))
|
||||
virBufferAddLit(&buf, ",iommu=on");
|
||||
/* The 'intel' IOMMu is formatted in qemuBuildIOMMUCommandLine */
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
|
||||
@ -10489,7 +10476,7 @@ qemuBuildCommandLine(virQEMUDriver *driver,
|
||||
if (qemuBuildBootCommandLine(cmd, def, qemuCaps) < 0)
|
||||
return NULL;
|
||||
|
||||
if (qemuBuildIOMMUCommandLine(cmd, def, qemuCaps) < 0)
|
||||
if (qemuBuildIOMMUCommandLine(cmd, def) < 0)
|
||||
return NULL;
|
||||
|
||||
if (qemuBuildGlobalControllerCommandLine(cmd, def) < 0)
|
||||
|
@ -4726,8 +4726,7 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu,
|
||||
virDomainIOMMUModelTypeToString(iommu->model));
|
||||
return -1;
|
||||
}
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_INTEL_IOMMU) &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_IOMMU)) {
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_INTEL_IOMMU)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("IOMMU device: '%s' is not supported with "
|
||||
"this QEMU binary"),
|
||||
|
Loading…
Reference in New Issue
Block a user