Re: [git pull] IOMMU Updates for Linux v6.4

From: Jason Gunthorpe
Date: Fri May 05 2023 - 15:57:24 EST


On Fri, May 05, 2023 at 11:03:46AM -0700, Linus Torvalds wrote:

> That config option rename in particular I find to just be bad. We now
> have some code that is *very* central, to the point where we have a
> field for it in the 'struct mm_struct', and special callback for
> fork() and exit(), and then the config option is called something
> completely incomprehensible like 'IOMMU_SVA'?

The purpose of this field is to enable the new Intel ENQCMD
instruction that requries the arch code to put the processes PASID
value into some MSR and keep it there across context switches. See
commit fa6af69f38d3 ("x86/traps: Demand-populate PASID MSR via #GP")

ENQCMD is used when the IOMMU page table points directly at the CPU
page table (Shared Virtual Addressing) and supports some simple
stateless "PCI" devices that Intel has designed.

At least with the current situation CONFIG_INTEL_ENQCMD might be an
appropriate name, split out from the IOMMU kconfig and put in arch
kconfig?

Ideally we wouldn't need this on today's ARM systems, for instance.

Jason