iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/virtio: Build virtio-iommu as module
@ 2020-02-14 16:38 Jean-Philippe Brucker
  2020-02-19 11:16 ` Joerg Roedel
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Philippe Brucker @ 2020-02-14 16:38 UTC (permalink / raw)
  To: iommu, virtualization

From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>

Now that the infrastructure changes are in place, enable virtio-iommu to
be built as a module. Remove the redundant pci_request_acs() call, since
it's not exported but is already invoked during DMA setup.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
---
This conflicts with the multiplatform work [1] since they both change
Kconfig. Locally I have this patch applied on top of that series but
there is no functional dependency between the two.

[1] https://lore.kernel.org/linux-iommu/20200214160413.1475396-1-jean-philippe@linaro.org/
---
 drivers/iommu/Kconfig        | 4 ++--
 drivers/iommu/virtio-iommu.c | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index adcbda44d473..bfd4e5fcd6aa 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -506,8 +506,8 @@ config HYPERV_IOMMU
 	  guests to run with x2APIC mode enabled.
 
 config VIRTIO_IOMMU
-	bool "Virtio IOMMU driver"
-	depends on VIRTIO=y
+	tristate "Virtio IOMMU driver"
+	depends on VIRTIO
 	depends on (ARM64 || X86)
 	select IOMMU_API
 	select IOMMU_DMA
diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index f18ba8e22ebd..5429c12c879b 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -1084,7 +1084,6 @@ static int viommu_probe(struct virtio_device *vdev)
 
 #ifdef CONFIG_PCI
 	if (pci_bus_type.iommu_ops != &viommu_ops) {
-		pci_request_acs();
 		ret = bus_set_iommu(&pci_bus_type, &viommu_ops);
 		if (ret)
 			goto err_unregister;
-- 
2.25.0

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/virtio: Build virtio-iommu as module
  2020-02-14 16:38 [PATCH] iommu/virtio: Build virtio-iommu as module Jean-Philippe Brucker
@ 2020-02-19 11:16 ` Joerg Roedel
  2020-02-19 11:41   ` Jean-Philippe Brucker
  0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2020-02-19 11:16 UTC (permalink / raw)
  To: Jean-Philippe Brucker; +Cc: iommu, virtualization

On Fri, Feb 14, 2020 at 05:38:27PM +0100, Jean-Philippe Brucker wrote:
> From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
> 
> Now that the infrastructure changes are in place, enable virtio-iommu to
> be built as a module. Remove the redundant pci_request_acs() call, since
> it's not exported but is already invoked during DMA setup.

Which infrastructure changes do you mean? Does this depend on the x86
enablement patch-set in any way?


Regards,

	Joerg

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/virtio: Build virtio-iommu as module
  2020-02-19 11:16 ` Joerg Roedel
@ 2020-02-19 11:41   ` Jean-Philippe Brucker
  2020-02-19 12:33     ` Joerg Roedel
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Philippe Brucker @ 2020-02-19 11:41 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, virtualization

Hi Joerg,

On Wed, Feb 19, 2020 at 12:16:04PM +0100, Joerg Roedel wrote:
> On Fri, Feb 14, 2020 at 05:38:27PM +0100, Jean-Philippe Brucker wrote:
> > From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
> > 
> > Now that the infrastructure changes are in place, enable virtio-iommu to
> > be built as a module. Remove the redundant pci_request_acs() call, since
> > it's not exported but is already invoked during DMA setup.
> 
> Which infrastructure changes do you mean? Does this depend on the x86
> enablement patch-set in any way?

No, I meant Will's changes in 5.6 to make the SMMU drivers modular. This
patch doesn't depend on the x86 enablement patch-set, but there is a small
conflict in Kconfig since they both modify it (locally I have this patch
applied on top of the x86 enablement).

Thanks,
Jean
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/virtio: Build virtio-iommu as module
  2020-02-19 11:41   ` Jean-Philippe Brucker
@ 2020-02-19 12:33     ` Joerg Roedel
  0 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2020-02-19 12:33 UTC (permalink / raw)
  To: Jean-Philippe Brucker; +Cc: iommu, virtualization

On Wed, Feb 19, 2020 at 12:41:33PM +0100, Jean-Philippe Brucker wrote:
> No, I meant Will's changes in 5.6 to make the SMMU drivers modular. This
> patch doesn't depend on the x86 enablement patch-set, but there is a small
> conflict in Kconfig since they both modify it (locally I have this patch
> applied on top of the x86 enablement).

Yeah, I noticed the conflict when I applied it and that's why I asked.
Thanks for clarifying, the patch is now applied.


Regards,

	Joerg
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2020-02-19 12:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 16:38 [PATCH] iommu/virtio: Build virtio-iommu as module Jean-Philippe Brucker
2020-02-19 11:16 ` Joerg Roedel
2020-02-19 11:41   ` Jean-Philippe Brucker
2020-02-19 12:33     ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).