hw/i386: make IOMMUs configurable via default-configs/
PATCH 1/1 hw/i386: make IOMMUs configurable via default-configs/
Allow distributions to disable the Intel and/or AMD IOMMU devices.
Signed-off-by Paolo Bonzini <[email protected]>
--- default-configs/i386-softmmu.mak | 2 ++ default-configs/x86_64-softmmu.mak | 2 ++ hw/i386/Makefile.objs | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-)
default-configs/i386-softmmu.mak +2 -0
@@ -63,3 +63,5 @@ CONFIG_PXB=y CONFIG_ACPI_VMGENID=y CONFIG_FW_CFG_DMA=y CONFIG_I2C=y +CONFIG_VTD=y +CONFIG_AMD_IOMMU=y
default-configs/x86_64-softmmu.mak +2 -0
@@ -63,3 +63,5 @@ CONFIG_PXB=y CONFIG_ACPI_VMGENID=y CONFIG_FW_CFG_DMA=y CONFIG_I2C=y +CONFIG_VTD=y +CONFIG_AMD_IOMMU=y
hw/i386/Makefile.objs +3 -2
@@ -2,8 +2,9 @@ obj-$(CONFIG_KVM) += kvm/ obj-y += multiboot.o obj-y += pc.o pc_piix.o pc_q35.o obj-y += pc_sysfw.o -obj-y += x86-iommu.o intel_iommu.o -obj-y += amd_iommu.o +obj-y += x86-iommu.o +obj-$(CONFIG_VTD) += x86-iommu.o intel_iommu.o +obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o obj-$(CONFIG_XEN) += ../xenpv/ xen/ obj-$(CONFIG_VMPORT) += vmport.o obj-$(CONFIG_VMMOUSE) += vmmouse.o
Signature · 1 line
2.14.3
Quoted 34 lines · Paolo Bonzini
Allow distributions to disable the Intel and/or AMD IOMMU devices.
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/i386-softmmu.mak | 2 ++ default-configs/x86_64-softmmu.mak | 2 ++ hw/i386/Makefile.objs | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-)default-configs/i386-softmmu.mak +2
-0@@ -63,3 +63,5 @@ CONFIG_PXB=y CONFIG_ACPI_VMGENID=y CONFIG_FW_CFG_DMA=y CONFIG_I2C=y +CONFIG_VTD=y +CONFIG_AMD_IOMMU=ydefault-configs/x86_64-softmmu.mak +2
-0@@ -63,3 +63,5 @@ CONFIG_PXB=y CONFIG_ACPI_VMGENID=y CONFIG_FW_CFG_DMA=y CONFIG_I2C=y +CONFIG_VTD=y +CONFIG_AMD_IOMMU=yhw/i386/Makefile.objs +0
-0
hw/i386/Makefile.objs obj-$(CONFIG_KVM) += kvm/ · line 6
Quoted 7 lines
hw/i386/Makefile.objs +2
-2@@ -2,8 +2,9 @@ obj-$(CONFIG_KVM) += kvm/ obj-y += multiboot.o obj-y += pc.o pc_piix.o pc_q35.o obj-y += pc_sysfw.o -obj-y += x86-iommu.o intel_iommu.o -obj-y += amd_iommu.o +obj-y += x86-iommu.o +obj-$(CONFIG_VTD) += x86-iommu.o intel_iommu.o
I think you have to remove x86-iommu.o in the above line, since it is included already one line earlier.
With that modification:
Reviewed-by Thomas Huth <[email protected]>
Quoted 37 lines · Thomas Huth
Quoted 36 lines · Paolo Bonzini
Allow distributions to disable the Intel and/or AMD IOMMU devices.
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/i386-softmmu.mak | 2 ++ default-configs/x86_64-softmmu.mak | 2 ++ hw/i386/Makefile.objs | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-)default-configs/i386-softmmu.mak +2
-0@@ -63,3 +63,5 @@ CONFIG_PXB=y CONFIG_ACPI_VMGENID=y CONFIG_FW_CFG_DMA=y CONFIG_I2C=y +CONFIG_VTD=y +CONFIG_AMD_IOMMU=ydefault-configs/x86_64-softmmu.mak +2
-0@@ -63,3 +63,5 @@ CONFIG_PXB=y CONFIG_ACPI_VMGENID=y CONFIG_FW_CFG_DMA=y CONFIG_I2C=y +CONFIG_VTD=y +CONFIG_AMD_IOMMU=yhw/i386/Makefile.objs +0
-0@@ -2,8 +2,9 @@ obj-$(CONFIG_KVM) += kvm/ obj-y += multiboot.o obj-y += pc.o pc_piix.o pc_q35.o
Quoted 8 lines
hw/i386/Makefile.objs obj-$(CONFIG_KVM) += kvm/ · line 6
Quoted 5 lines
hw/i386/Makefile.objs +2
-2obj-y += pc_sysfw.o -obj-y += x86-iommu.o intel_iommu.o -obj-y += amd_iommu.o +obj-y += x86-iommu.o +obj-$(CONFIG_VTD) += x86-iommu.o intel_iommu.oI think you have to remove x86-iommu.o in the above line, since it is included already one line earlier.
... or add it to both lines (Intel and AMD IOMMU). Thanks for the review!
Paolo
Quoted 4 lines
With that modification:
Reviewed-by Thomas Huth <[email protected]>