Disabling the IOMMU for an assigned device was never more than a highly experimental features and is no longer supported by host kernels >= 3.2. So drop this useless control from property list. Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> --- hw/device-assignment.c | 22 ++++++---------------- hw/device-assignment.h | 6 ++---- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 077d81e..b9b955b 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -749,21 +749,13 @@ static int assign_device(AssignedDevice *dev) assigned_dev_data.busnr = dev->h_busnr; assigned_dev_data.devfn = dev->h_devfn; - /* We always enable the IOMMU unless disabled on the command line */ - if (dev->features & ASSIGNED_DEVICE_USE_IOMMU_MASK) { - if (!kvm_check_extension(kvm_state, KVM_CAP_IOMMU)) { - fprintf(stderr, "No IOMMU found. Unable to assign device \"%s\"\n", - dev->dev.qdev.id); - return -ENODEV; - } - assigned_dev_data.flags |= KVM_DEV_ASSIGN_ENABLE_IOMMU; - } - if (!(dev->features & ASSIGNED_DEVICE_USE_IOMMU_MASK)) { - fprintf(stderr, - "WARNING: Assigning a device without IOMMU protection can " - "cause host memory corruption if the device issues DMA write " - "requests!\n"); + assigned_dev_data.flags = KVM_DEV_ASSIGN_ENABLE_IOMMU; + if (!kvm_check_extension(kvm_state, KVM_CAP_IOMMU)) { + fprintf(stderr, "No IOMMU found. Unable to assign device \"%s\"\n", + dev->dev.qdev.id); + return -ENODEV; } + if (dev->features & ASSIGNED_DEVICE_SHARE_INTX_MASK && kvm_has_intx_set_mask()) { assigned_dev_data.flags |= KVM_DEV_ASSIGN_PCI_2_3; @@ -1782,8 +1774,6 @@ PropertyInfo qdev_prop_hostaddr = { static Property da_properties[] = { DEFINE_PROP("host", AssignedDevice, host, qdev_prop_hostaddr, PCIHostDevice), - DEFINE_PROP_BIT("iommu", AssignedDevice, features, - ASSIGNED_DEVICE_USE_IOMMU_BIT, true), DEFINE_PROP_BIT("prefer_msi", AssignedDevice, features, ASSIGNED_DEVICE_PREFER_MSI_BIT, false), DEFINE_PROP_BIT("share_intx", AssignedDevice, features, diff --git a/hw/device-assignment.h b/hw/device-assignment.h index 5d271d5..1ef2dbe 100644 --- a/hw/device-assignment.h +++ b/hw/device-assignment.h @@ -74,11 +74,9 @@ typedef struct { PCIRegion *region; } AssignedDevRegion; -#define ASSIGNED_DEVICE_USE_IOMMU_BIT 0 -#define ASSIGNED_DEVICE_PREFER_MSI_BIT 1 -#define ASSIGNED_DEVICE_SHARE_INTX_BIT 2 +#define ASSIGNED_DEVICE_PREFER_MSI_BIT 0 +#define ASSIGNED_DEVICE_SHARE_INTX_BIT 1 -#define ASSIGNED_DEVICE_USE_IOMMU_MASK (1 << ASSIGNED_DEVICE_USE_IOMMU_BIT) #define ASSIGNED_DEVICE_PREFER_MSI_MASK (1 << ASSIGNED_DEVICE_PREFER_MSI_BIT) #define ASSIGNED_DEVICE_SHARE_INTX_MASK (1 << ASSIGNED_DEVICE_SHARE_INTX_BIT) -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html