Linux IOMMU Development
 help / color / mirror / Atom feed
From: "Suthikulpanit, Suravee" <suravee.suthikulpanit@amd.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: linux-kernel@vger.kernel.org, joro@8bytes.org,
	kevin.tian@intel.com, vasant.hegde@amd.com,
	iommu@lists.linux.dev, santosh.shukla@amd.com,
	sairaj.arunkodilkar@amd.com, jon.grimm@amd.com,
	prashanthpra@google.com, wvw@google.com, wnliu@google.com,
	gptran@google.com, kpsingh@google.com
Subject: Re: [PATCH] iommu/amd: Add support for hw_info for iommu capability query
Date: Tue, 26 Aug 2025 13:43:59 -0500	[thread overview]
Message-ID: <a4260493-9f75-4446-ad01-61556ed8e034@amd.com> (raw)
In-Reply-To: <20250826175813.GH2130239@nvidia.com>



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

  reply	other threads:[~2025-08-26 18:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20  4:25 [PATCH] iommu/amd: Add support for hw_info for iommu capability query Suravee Suthikulpanit
2025-08-25 13:44 ` Jason Gunthorpe
2025-08-26 17:36   ` Suthikulpanit, Suravee
2025-08-26 17:58     ` Jason Gunthorpe
2025-08-26 18:43       ` Suthikulpanit, Suravee [this message]
2025-08-26 18:48         ` Jason Gunthorpe

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=a4260493-9f75-4446-ad01-61556ed8e034@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=gptran@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=jon.grimm@amd.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kpsingh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prashanthpra@google.com \
    --cc=sairaj.arunkodilkar@amd.com \
    --cc=santosh.shukla@amd.com \
    --cc=vasant.hegde@amd.com \
    --cc=wnliu@google.com \
    --cc=wvw@google.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