diff mbox series

[topic/core-for-ci] iommu/vt-d: Check domain flags before setting snp bit in page-control

Message ID 20230802151755.2874738-1-radhakrishna.sripada@intel.com (mailing list archive)
State New, archived
Headers show
Series [topic/core-for-ci] iommu/vt-d: Check domain flags before setting snp bit in page-control | expand

Commit Message

Sripada, Radhakrishna Aug. 2, 2023, 3:17 p.m. UTC
From: Ashok Raj <ashok.raj@intel.com>

Check domain flags before setting snp bit in PTE.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
---
 drivers/iommu/intel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 5c8c5cdc36cf..71da6f818e96 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2150,7 +2150,7 @@  __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
 	if ((prot & (DMA_PTE_READ|DMA_PTE_WRITE)) == 0)
 		return -EINVAL;
 
-	attr = prot & (DMA_PTE_READ | DMA_PTE_WRITE | DMA_PTE_SNP);
+	attr = prot & (DMA_PTE_READ | DMA_PTE_WRITE);
 	attr |= DMA_FL_PTE_PRESENT;
 	if (domain->use_first_level) {
 		attr |= DMA_FL_PTE_XD | DMA_FL_PTE_US | DMA_FL_PTE_ACCESS;