From: Shivaprasad G Bhat <sbhat@linux.ibm.com>
To: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
kvm@vger.kernel.org, iommu@lists.linux.dev
Cc: mpe@ellerman.id.au, maddy@linux.ibm.com, npiggin@gmail.com,
alex@shazbot.org, joerg.roedel@amd.com, kevin.tian@intel.com,
gbatra@linux.ibm.com, jgg@nvidia.com, clg@kaod.org,
vaibhav@linux.ibm.com, brking@linux.vnet.ibm.com,
nnmlinux@linux.ibm.com, amachhiw@linux.ibm.com,
tpearson@raptorengineering.com
Subject: Re: [RFC PATCH] powerpc: iommu: Initial IOMMUFD support for PPC64
Date: Tue, 3 Feb 2026 21:24:34 +0530 [thread overview]
Message-ID: <c6f64344-f211-460d-ae4f-bffdbd96182a@linux.ibm.com> (raw)
In-Reply-To: <974a95d4-0ae5-400a-992f-9e468a0666d6@kernel.org>
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/>
prev parent reply other threads:[~2026-02-03 15:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 18:35 [RFC PATCH] powerpc: iommu: Initial IOMMUFD support for PPC64 Shivaprasad G Bhat
2026-01-27 19:16 ` Jason Gunthorpe
2026-02-03 15:52 ` Shivaprasad G Bhat
2026-02-03 18:07 ` Jason Gunthorpe
2026-02-04 15:23 ` Shivaprasad G Bhat
2026-01-28 10:53 ` Christophe Leroy (CS GROUP)
2026-02-03 15:54 ` Shivaprasad G Bhat [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c6f64344-f211-460d-ae4f-bffdbd96182a@linux.ibm.com \
--to=sbhat@linux.ibm.com \
--cc=alex@shazbot.org \
--cc=amachhiw@linux.ibm.com \
--cc=brking@linux.vnet.ibm.com \
--cc=chleroy@kernel.org \
--cc=clg@kaod.org \
--cc=gbatra@linux.ibm.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joerg.roedel@amd.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=nnmlinux@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=tpearson@raptorengineering.com \
--cc=vaibhav@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox