Re: [PATCHv8 00/11] Linear Address Masking enabling

From: Dave Hansen
Date: Wed Sep 21 2022 - 13:11:55 EST


On 9/21/22 10:08, Ashok Raj wrote:
> 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.

What does that mean, though?

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?