lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6f64344-f211-460d-ae4f-bffdbd96182a@linux.ibm.com>
Date: Tue, 3 Feb 2026 21:24:34 +0530
From: Shivaprasad G Bhat <sbhat@...ux.ibm.com>
To: "Christophe Leroy (CS GROUP)" <chleroy@...nel.org>,
        linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        kvm@...r.kernel.org, iommu@...ts.linux.dev
Cc: mpe@...erman.id.au, maddy@...ux.ibm.com, npiggin@...il.com,
        alex@...zbot.org, joerg.roedel@....com, kevin.tian@...el.com,
        gbatra@...ux.ibm.com, jgg@...dia.com, clg@...d.org,
        vaibhav@...ux.ibm.com, brking@...ux.vnet.ibm.com,
        nnmlinux@...ux.ibm.com, amachhiw@...ux.ibm.com,
        tpearson@...torengineering.com
Subject: Re: [RFC PATCH] powerpc: iommu: Initial IOMMUFD support for PPC64

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/>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ