[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aa07f3e8-0f68-4772-975f-d9deefd7a019@arm.com>
Date: Tue, 22 Oct 2024 13:30:51 +0100
From: Robin Murphy <robin.murphy@....com>
To: Angus Chen <angus.chen@...uarmicro.com>, "joro@...tes.org"
<joro@...tes.org>, "will@...nel.org" <will@...nel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>
Subject: Re: [PATCH] iommu: Distinguish between sw-msi and msi
On 22/10/2024 1:02 pm, Angus Chen wrote:
> Hi robin。
>
>> -----Original Message-----
>> From: Robin Murphy <robin.murphy@....com>
>> Sent: Monday, October 21, 2024 7:59 PM
>> To: Angus Chen <angus.chen@...uarmicro.com>; joro@...tes.org;
>> will@...nel.org
>> Cc: linux-kernel@...r.kernel.org; iommu@...ts.linux.dev
>> Subject: Re: [PATCH] iommu: Distinguish between sw-msi and msi
>>
>> On 2024-10-21 12:34 pm, Angus Chen wrote:
>>> iommu_group_resv_type_string use the same string of IOMMU_RESV_MSI
>>> and IOMMU_RESV_SW_MSI, Make a distinction for these.
>>
>> Why? What in userspace needs to know the exact details of how the kernel
>> and the underlying hardware are routing MSIs?
> We use smmu-v3 for a dpu design,and we set a private region to handle msi region like x86.
> We set some private iommu register to control this.
> If some customer want to use their os like openouler, we use sw-msi mode.
> If some customer want to use our customize os ,we will set msi private.
> Some customer use openouler and we private smmu-v3 module at the same time,
>
> So I want to use reserve-type to distinguish between sw-msi and msi.
But *why*? What do you expect userspace to do with this information? It
was a deliberate choice not to expose this distinction, precisely
*because* it should make no difference to a VFIO user whether an MSI
address range is defined by the platform or by the IOMMU driver, and if
userspace did think it wants to know that then it's probably doing
something wrong. IIRC, the reason for distinguishing "msi" from
"reserved" at all was just as a hint to userspace that although the
address range is still not usable for remapping memory, it's a good
place for a VMM to put an emulated MSI doorbell in GPA/IPA space.
Also, this has been userspace ABI since 2017, and changing it has a high
risk of breaking existing users who are looking for an "msi" region, so no.
Thanks,
Robin.
Powered by blists - more mailing lists