Re: [PATCH V10 02/11] iommu/uapi: Define a mask for bind data
Hi Jacob, On 3/21/20 12:27 AM, Jacob Pan wrote: > Memory type related flags can be grouped together for one simple check. > > --- > v9 renamed from EMT to MTS since these are memory type support flags. > --- > > Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Thanks Eric > --- > include/uapi/linux/iommu.h | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h > index 4ad3496e5c43..d7bcbc5f79b0 100644 > --- a/include/uapi/linux/iommu.h > +++ b/include/uapi/linux/iommu.h > @@ -284,7 +284,10 @@ struct iommu_gpasid_bind_data_vtd { > __u32 pat; > __u32 emt; > }; > - > +#define IOMMU_SVA_VTD_GPASID_MTS_MASK(IOMMU_SVA_VTD_GPASID_CD | \ > + IOMMU_SVA_VTD_GPASID_EMTE | \ > + IOMMU_SVA_VTD_GPASID_PCD | \ > + IOMMU_SVA_VTD_GPASID_PWT) > /** > * struct iommu_gpasid_bind_data - Information about device and guest PASID > binding > * @version: Version of this data structure > ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
RE: [PATCH V10 02/11] iommu/uapi: Define a mask for bind data
> From: Jacob Pan > Sent: Saturday, March 21, 2020 7:28 AM > > Memory type related flags can be grouped together for one simple check. > > --- > v9 renamed from EMT to MTS since these are memory type support flags. > --- > > Signed-off-by: Jacob Pan > --- > include/uapi/linux/iommu.h | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h > index 4ad3496e5c43..d7bcbc5f79b0 100644 > --- a/include/uapi/linux/iommu.h > +++ b/include/uapi/linux/iommu.h > @@ -284,7 +284,10 @@ struct iommu_gpasid_bind_data_vtd { > __u32 pat; > __u32 emt; > }; > - > +#define IOMMU_SVA_VTD_GPASID_MTS_MASK > (IOMMU_SVA_VTD_GPASID_CD | \ > + IOMMU_SVA_VTD_GPASID_EMTE | \ > + IOMMU_SVA_VTD_GPASID_PCD | \ > + IOMMU_SVA_VTD_GPASID_PWT) > /** > * struct iommu_gpasid_bind_data - Information about device and guest > PASID binding > * @version: Version of this data structure > -- > 2.7.4 Reviewed-by: Kevin Tian ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH V10 02/11] iommu/uapi: Define a mask for bind data
On 2020/3/24 3:37, Jacob Pan wrote: On Sun, 22 Mar 2020 09:29:32 +0800> Lu Baolu wrote: On 2020/3/21 7:27, Jacob Pan wrote: Memory type related flags can be grouped together for one simple check. --- v9 renamed from EMT to MTS since these are memory type support flags. --- Signed-off-by: Jacob Pan --- include/uapi/linux/iommu.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h index 4ad3496e5c43..d7bcbc5f79b0 100644 --- a/include/uapi/linux/iommu.h +++ b/include/uapi/linux/iommu.h @@ -284,7 +284,10 @@ struct iommu_gpasid_bind_data_vtd { __u32 pat; __u32 emt; }; - +#define IOMMU_SVA_VTD_GPASID_MTS_MASK (IOMMU_SVA_VTD_GPASID_CD | \ +IOMMU_SVA_VTD_GPASID_EMTE | \ +IOMMU_SVA_VTD_GPASID_PCD | \ + IOMMU_SVA_VTD_GPASID_PWT) As name implies, can this move to intel-iommu.h? I also thought about this but the masks are in vendor specific part of the UAPI. I looked through this patch series. It looks good to me. I will do some code style cleanup and take it to v5.7. I am not the right person to decide whether include/uapi/linux/iommu.h is the right place for this, so I will move it to Intel IOMMU driver for now. Best regards, baolu ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH V10 02/11] iommu/uapi: Define a mask for bind data
On Sun, 22 Mar 2020 09:29:32 +0800 Lu Baolu wrote: > On 2020/3/21 7:27, Jacob Pan wrote: > > Memory type related flags can be grouped together for one simple > > check. > > > > --- > > v9 renamed from EMT to MTS since these are memory type support > > flags. --- > > > > Signed-off-by: Jacob Pan > > --- > > include/uapi/linux/iommu.h | 5 - > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h > > index 4ad3496e5c43..d7bcbc5f79b0 100644 > > --- a/include/uapi/linux/iommu.h > > +++ b/include/uapi/linux/iommu.h > > @@ -284,7 +284,10 @@ struct iommu_gpasid_bind_data_vtd { > > __u32 pat; > > __u32 emt; > > }; > > - > > +#define IOMMU_SVA_VTD_GPASID_MTS_MASK > > (IOMMU_SVA_VTD_GPASID_CD | \ > > +IOMMU_SVA_VTD_GPASID_EMTE > > | \ > > +IOMMU_SVA_VTD_GPASID_PCD > > | \ > > + > > IOMMU_SVA_VTD_GPASID_PWT) > > As name implies, can this move to intel-iommu.h? > I also thought about this but the masks are in vendor specific part of the UAPI. > Best regards, > baolu > > > /** > >* struct iommu_gpasid_bind_data - Information about device and > > guest PASID binding > >* @version: Version of this data structure > > [Jacob Pan] ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH V10 02/11] iommu/uapi: Define a mask for bind data
On 2020/3/21 7:27, Jacob Pan wrote: Memory type related flags can be grouped together for one simple check. --- v9 renamed from EMT to MTS since these are memory type support flags. --- Signed-off-by: Jacob Pan --- include/uapi/linux/iommu.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h index 4ad3496e5c43..d7bcbc5f79b0 100644 --- a/include/uapi/linux/iommu.h +++ b/include/uapi/linux/iommu.h @@ -284,7 +284,10 @@ struct iommu_gpasid_bind_data_vtd { __u32 pat; __u32 emt; }; - +#define IOMMU_SVA_VTD_GPASID_MTS_MASK (IOMMU_SVA_VTD_GPASID_CD | \ +IOMMU_SVA_VTD_GPASID_EMTE | \ +IOMMU_SVA_VTD_GPASID_PCD | \ +IOMMU_SVA_VTD_GPASID_PWT) As name implies, can this move to intel-iommu.h? Best regards, baolu /** * struct iommu_gpasid_bind_data - Information about device and guest PASID binding * @version: Version of this data structure ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
[PATCH V10 02/11] iommu/uapi: Define a mask for bind data
Memory type related flags can be grouped together for one simple check. --- v9 renamed from EMT to MTS since these are memory type support flags. --- Signed-off-by: Jacob Pan --- include/uapi/linux/iommu.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h index 4ad3496e5c43..d7bcbc5f79b0 100644 --- a/include/uapi/linux/iommu.h +++ b/include/uapi/linux/iommu.h @@ -284,7 +284,10 @@ struct iommu_gpasid_bind_data_vtd { __u32 pat; __u32 emt; }; - +#define IOMMU_SVA_VTD_GPASID_MTS_MASK (IOMMU_SVA_VTD_GPASID_CD | \ +IOMMU_SVA_VTD_GPASID_EMTE | \ +IOMMU_SVA_VTD_GPASID_PCD | \ +IOMMU_SVA_VTD_GPASID_PWT) /** * struct iommu_gpasid_bind_data - Information about device and guest PASID binding * @version: Version of this data structure -- 2.7.4 ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu