Re: [PATCH v3 1/7] iommu/vt-d: Use non-privileged mode for all PASIDs

From: Baolu Lu
Date: Sat Apr 01 2023 - 09:41:24 EST


On 2023/4/1 7:11, Jacob Pan wrote:
Supervisor Request Enable (SRE) bit in a PASID entry is for permission
checking on DMA requests. When SRE = 0, DMA with supervisor privilege
will be blocked. However, for in-kernel DMA this is not necessary in that
we are targeting kernel memory anyway. There's no need to differentiate
user and kernel for in-kernel DMA.

Let's use non-privileged (user) permission for all PASIDs used in kernel,
it will be consistent with DMA without PASID (RID_PASID) as well.

Signed-off-by: Jacob Pan<jacob.jun.pan@xxxxxxxxxxxxxxx>

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

Best regards,
baolu