Re: [PATCHv8 00/11] Linear Address Masking enabling
From: Kirill A. Shutemov
Date: Fri Sep 23 2022 - 05:40:58 EST
On Thu, Sep 22, 2022 at 10:27:45PM -0700, Ashok Raj wrote:
> On Fri, Sep 23, 2022 at 03:42:39AM +0300, Kirill A. Shutemov wrote:
> > On Wed, Sep 21, 2022 at 03:11:34PM -0300, Jason Gunthorpe wrote:
> > > On Wed, Sep 21, 2022 at 10:11:46AM -0700, Dave Hansen wrote:
> > >
> > > > Are you saying that any device compatibility with an mm is solely
> > > > determined by the IOMMU in play, so the IOMMU code should host the mm
> > > > compatibility checks?
> > >
> > > Yes, exactly. Only the HW entity that walks the page tables needs to
> > > understand their parsing rules and in this case that is only the IOMMU
> > > block.
> >
> > But device has to know what bits of the virtual address are significant to
> > handle device TLB lookup/store correctly, no?
>
> For a device that also cares about tagging, yes. But in the current
> world we don't have such devices. IOMMU only knows about the shared cr3
> we placed in the PASID table entries to walk page-tables. I hope the
> page-tables don't factor the meta-data bits correct?
Correct. Page tables contain only physical addresses, so they have no
exposure to tags in the virtual addresses.
> So I would assume an untagged pointer should just be fine for the IOMMU
> to walk. IOMMU currently wants canonical addresses for VA.
Right. But it means that LAM compatibility can be block on two layers:
IOMMU and device. IOMMU is not the only HW entity that has to be aware of
tagged pointers.
So where to put compatibility check that can cover both device and IOMMU,
considering that in the future they can get aware about tagged pointers?
--
Kiryl Shutsemau / Kirill A. Shutemov