Jean-Philippe Brucker
2020-Feb-14 16:38 UTC
[PATCH] iommu/virtio: Build virtio-iommu as module
From: Jean-Philippe Brucker <jean-philippe.brucker at 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 at 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 at 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
On Fri, Feb 14, 2020 at 05:38:27PM +0100, Jean-Philippe Brucker wrote:> From: Jean-Philippe Brucker <jean-philippe.brucker at 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
Jean-Philippe Brucker
2020-Feb-19 11:41 UTC
[PATCH] iommu/virtio: Build virtio-iommu as module
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 at 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
Seemingly Similar Threads
- [PATCH] iommu/virtio: Build virtio-iommu as module
- [PATCH] iommu/virtio: Build virtio-iommu as module
- [PATCH] iommu/virtio: Build virtio-iommu as module
- [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space
- [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space