lkml.org 
[lkml]   [2020]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v6 07/12] mm: Define pasid in mm
    Date
    PASID is shared by all threads in a process. So the logical place to keep
    track of it is in the "mm". Both ARM and X86 need to use the PASID in the
    "mm".

    Suggested-by: Christoph Hellwig <hch@infradead.org>
    Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
    Reviewed-by: Tony Luck <tony.luck@intel.com>
    ---
    v4:
    - Change PASID type to u32 (Christoph)

    v3:
    - Change CONFIG_PCI_PASID to CONFIG_IOMMU_SUPPORT because non-PCI device
    can have PASID in ARM (Jean)

    v2:
    - This new patch moves "pasid" from x86 specific mm_context_t to generic
    struct mm_struct per Christopher's comment: https://lore.kernel.org/linux-iommu/20200414170252.714402-1-jean-philippe@linaro.org/T/#mb57110ffe1aaa24750eeea4f93b611f0d1913911
    - Jean-Philippe Brucker released a virtually same patch. I still put this
    patch in the series for better review. The upstream kernel only needs one
    of the two patches eventually.
    https://lore.kernel.org/linux-iommu/20200519175502.2504091-2-jean-philippe@linaro.org/
    - Change CONFIG_IOASID to CONFIG_PCI_PASID (Ashok)

    include/linux/mm_types.h | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
    index 64ede5f150dc..d61285cfe027 100644
    --- a/include/linux/mm_types.h
    +++ b/include/linux/mm_types.h
    @@ -538,6 +538,10 @@ struct mm_struct {
    atomic_long_t hugetlb_usage;
    #endif
    struct work_struct async_put_work;
    +
    +#ifdef CONFIG_IOMMU_SUPPORT
    + u32 pasid;
    +#endif
    } __randomize_layout;

    /*
    --
    2.19.1
    \
     
     \ /
      Last update: 2020-07-14 01:49    [W:2.739 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site