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 */
static int
qemuBuildIOMMUCommandLine(virCommand *cmd,
- const virDomainDef *def,
- virQEMUCaps *qemuCaps)
+ const virDomainDef *def)
{
const virDomainIOMMUDef *iommu = def->iommu;
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",
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:
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)
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"),