[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YytFGqv5V4T8lbM8@araj-MOBL2.amr.corp.intel.com>
Date: Wed, 21 Sep 2022 10:08:42 -0700
From: Ashok Raj <ashok.raj@...el.com>
To: Dave Hansen <dave.hansen@...el.com>
CC: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Jacob Pan <jacob.jun.pan@...el.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Ashok Raj <ashok_raj@...ux.intel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
"Peter Zijlstra" <peterz@...radead.org>, <x86@...nel.org>,
Kostya Serebryany <kcc@...gle.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Alexander Potapenko <glider@...gle.com>,
"Taras Madan" <tarasmadan@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
"H . J . Lu" <hjl.tools@...il.com>,
Andi Kleen <ak@...ux.intel.com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
Jason Gunthorpe <jgg@...dia.com>,
"Joerg Roedel" <joro@...tes.org>, Ashok Raj <ashok.raj@...el.com>
Subject: Re: [PATCHv8 00/11] Linear Address Masking enabling
On Wed, Sep 21, 2022 at 09:57:47AM -0700, Dave Hansen wrote:
> On 9/15/22 10:28, Kirill A. Shutemov wrote:> + /* Serialize against
> address tagging enabling *
> > + if (mmap_write_lock_killable(mm))
> > + return -EINTR;
> > +
> > + if (!arch_can_alloc_pasid(mm)) {
> > + mmap_write_unlock(mm);
> > + return -EBUSY;
> > + }
>
> Shouldn't this actually be some kind of *device* check?
The device will enable svm only when its capable of it, and performs all
the normal capability checks like PASID, ATS etc before enabling it.
This is the final step before the mm is hooked up with the IOMMU.
>
> The question here is whether the gunk in the mm's address space is
> compatible with the device.
>
> * Can the device walk the page tables in use under the mm?
> * Does the device interpret addresses the same way as the CPUs
> using the mm?
>
> The page table format is, right now, wholly determined at boot at the
> latest. But, it probably wouldn't hurt to pretend like it _might_
> change at runtime.
>
> The address interpretation part is, of course, what LAM changes. It's
> also arguable that it includes features like protection keys. I can
> totally see a case where folks might want to be careful and disallow
> device access to an mm where pkeys are in use.
Powered by blists - more mailing lists