All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/i386: make IOMMUs configurable via default-configs/
@ 2018-02-28  9:32 Paolo Bonzini
  2018-03-12  5:41 ` Thomas Huth
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2018-02-28  9:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: ddepaula

Allow distributions to disable the Intel and/or AMD IOMMU devices.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 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(-)

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 3326e3e0bb..9e5a29fa4a 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -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
diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
index 1c6cda1d9a..7baf91b921 100644
--- a/default-configs/x86_64-softmmu.mak
+++ b/default-configs/x86_64-softmmu.mak
@@ -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
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index fd279e7584..528b8dc431 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -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
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/i386: make IOMMUs configurable via default-configs/
  2018-02-28  9:32 [Qemu-devel] [PATCH] hw/i386: make IOMMUs configurable via default-configs/ Paolo Bonzini
@ 2018-03-12  5:41 ` Thomas Huth
  2018-03-12  9:44   ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2018-03-12  5:41 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: ddepaula

On 28.02.2018 10:32, Paolo Bonzini wrote:
> Allow distributions to disable the Intel and/or AMD IOMMU devices.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  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(-)
> 
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 3326e3e0bb..9e5a29fa4a 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -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
> diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
> index 1c6cda1d9a..7baf91b921 100644
> --- a/default-configs/x86_64-softmmu.mak
> +++ b/default-configs/x86_64-softmmu.mak
> @@ -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
> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> index fd279e7584..528b8dc431 100644
> --- a/hw/i386/Makefile.objs
> +++ b/hw/i386/Makefile.objs
> @@ -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 <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/i386: make IOMMUs configurable via default-configs/
  2018-03-12  5:41 ` Thomas Huth
@ 2018-03-12  9:44   ` Paolo Bonzini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2018-03-12  9:44 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: ddepaula

On 12/03/2018 06:41, Thomas Huth wrote:
> On 28.02.2018 10:32, Paolo Bonzini wrote:
>> Allow distributions to disable the Intel and/or AMD IOMMU devices.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  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(-)
>>
>> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
>> index 3326e3e0bb..9e5a29fa4a 100644
>> --- a/default-configs/i386-softmmu.mak
>> +++ b/default-configs/i386-softmmu.mak
>> @@ -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
>> diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
>> index 1c6cda1d9a..7baf91b921 100644
>> --- a/default-configs/x86_64-softmmu.mak
>> +++ b/default-configs/x86_64-softmmu.mak
>> @@ -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
>> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
>> index fd279e7584..528b8dc431 100644
>> --- a/hw/i386/Makefile.objs
>> +++ b/hw/i386/Makefile.objs
>> @@ -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.

... or add it to both lines (Intel and AMD IOMMU).  Thanks for the review!

Paolo

> With that modification:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-12  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28  9:32 [Qemu-devel] [PATCH] hw/i386: make IOMMUs configurable via default-configs/ Paolo Bonzini
2018-03-12  5:41 ` Thomas Huth
2018-03-12  9:44   ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.