[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4260493-9f75-4446-ad01-61556ed8e034@amd.com>
Date: Tue, 26 Aug 2025 13:43:59 -0500
From: "Suthikulpanit, Suravee" <suravee.suthikulpanit@....com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: linux-kernel@...r.kernel.org, joro@...tes.org, kevin.tian@...el.com,
vasant.hegde@....com, iommu@...ts.linux.dev, santosh.shukla@....com,
sairaj.arunkodilkar@....com, jon.grimm@....com, prashanthpra@...gle.com,
wvw@...gle.com, wnliu@...gle.com, gptran@...gle.com, kpsingh@...gle.com
Subject: Re: [PATCH] iommu/amd: Add support for hw_info for iommu capability
query
On 8/26/2025 12:58 PM, Jason Gunthorpe wrote:
> On Tue, Aug 26, 2025 at 12:36:23PM -0500, Suthikulpanit, Suravee wrote:
>>> I think you should probably just pass the raw HW value through and
>>> require the VMM to figure out what bits it needs based on feature
>>> flags elsewhere.
>>
>> The problem is some of the features are virtualized by hardware, which needs
>> enabling from the Linux AMD IOMMU driver. We cannot just provide all flags
>> since VMM would not know if the kernel has the support enabled.
>
> The VMM is not supposed to forward these flags as-is! It is sort of
> some kind of maximum what the underlying HW can support.
>
> If you forward as-is then the VMM will forward broken flags it doesn't
> support when the kernel gets updated, that isn't OK.
I got this part. That's why we mask out unsupported feature flags before
returning the EFR/EFR2 to the VMM.
> Each and every feature the VMM wants to show in the EFR has to figured
> out on its own if it can be supported based on other kernel features.
>
> The utility of the get_info return is for HW features that don't
> require any special kernel enablement.
Not sure if I got this part. Are you referring to the struct
vfio_iommu_type1_info and vfio_iommu_type1_get_info()?
Suravee
Powered by blists - more mailing lists