Hi Christophe.

Thanks for trying the patch.


On 1/28/26 4:23 PM, Christophe Leroy (CS GROUP) wrote:


Le 27/01/2026 à 19:35, Shivaprasad G Bhat a écrit :
The RFC attempts to implement the IOMMUFD support on PPC64 by
adding new iommu_ops for paging domain. The existing platform
domain continues to be the default domain for in-kernel use.
The domain ownership transfer ensures the reset of iommu states
for the new paging domain and in-kernel usage.


<snip/>

...
root:localhost# mount /dev/nvme0n1 /mnt
root:localhost# ls /mnt
...

The current patch is based on linux kernel 6.19-rc6 tree.

Getting the following build failure on linuxppc-dev patchwork with g5_defconfig or ppc64_defconfig:

Error: /linux/arch/powerpc/sysdev/dart_iommu.c:325:9: error: initialization of 'int (*)(struct iommu_table *, long int,  long int, long unsigned int,  enum dma_data_direction,  long unsigned int,  bool)' {aka 'int (*)(struct iommu_table *, long int,  long int,  long unsigned int,  enum dma_data_direction,  long unsigned int,  _Bool)'} from incompatible pointer type 'int (*)(struct iommu_table *, long int,  long int,  long unsigned int,  enum dma_data_direction,  long unsigned int)' [-Werror=incompatible-pointer-types]
  .set = dart_build,
         ^~~~~~~~~~
/linux/arch/powerpc/sysdev/dart_iommu.c:325:9: note: (near initialization for 'iommu_dart_ops.set')
cc1: all warnings being treated as errors
make[5]: *** [/linux/scripts/Makefile.build:287: arch/powerpc/sysdev/dart_iommu.o] Error 1 make[4]: *** [/linux/scripts/Makefile.build:544: arch/powerpc/sysdev] Error 2


I was trying only pseries and powernv configs. I see the changes would break

pasemi and dart iommus.


The below diff should get it going,

===========================

diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 375487cba874..75b526a560b8 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -77,7 +77,7 @@ static int iommu_table_iobmap_inited;
 static int iobmap_build(struct iommu_table *tbl, long index,
                         long npages, unsigned long uaddr,
                         enum dma_data_direction direction,
-                        unsigned long attrs)
+                        unsigned long attrs, bool is_phys)
 {
        u32 *ip;
        u32 rpn;
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index c0d10c149661..b424a602d07a 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -171,7 +171,7 @@ static void dart_flush(struct iommu_table *tbl)
 static int dart_build(struct iommu_table *tbl, long index,
                       long npages, unsigned long uaddr,
                       enum dma_data_direction direction,
-                      unsigned long attrs)
+                      unsigned long attrs, bool is_phys)
 {
        unsigned int *dp, *orig_dp;
        unsigned int rpn;

===========================


I will take care of it in next version.


Thank you!


Regards,

Shivaprasad


Christophe


<snip/>

Reply via email to