Skip to content

Commit 78df6c8

Browse files
Jacob Panjoergroedel
authored andcommitted
iommu/vt-d: Remove global page support in devTLB flush
Global pages support is removed from VT-d spec 3.0 for dev TLB invalidation. This patch is to remove the bits for vSVA. Similar change already made for the native SVA. See the link below. Signed-off-by: Jacob Pan <[email protected]> Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Eric Auger <[email protected]> Link: https://lore.kernel.org/linux-iommu/[email protected]/T/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 5f77d6c commit 78df6c8

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

drivers/iommu/intel/dmar.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,16 +1438,14 @@ void qi_flush_piotlb(struct intel_iommu *iommu, u16 did, u32 pasid, u64 addr,
14381438

14391439
/* PASID-based device IOTLB Invalidate */
14401440
void qi_flush_dev_iotlb_pasid(struct intel_iommu *iommu, u16 sid, u16 pfsid,
1441-
u32 pasid, u16 qdep, u64 addr,
1442-
unsigned int size_order, u64 granu)
1441+
u32 pasid, u16 qdep, u64 addr, unsigned int size_order)
14431442
{
14441443
unsigned long mask = 1UL << (VTD_PAGE_SHIFT + size_order - 1);
14451444
struct qi_desc desc = {.qw1 = 0, .qw2 = 0, .qw3 = 0};
14461445

14471446
desc.qw0 = QI_DEV_EIOTLB_PASID(pasid) | QI_DEV_EIOTLB_SID(sid) |
14481447
QI_DEV_EIOTLB_QDEP(qdep) | QI_DEIOTLB_TYPE |
14491448
QI_DEV_IOTLB_PFSID(pfsid);
1450-
desc.qw1 = QI_DEV_EIOTLB_GLOB(granu);
14511449

14521450
/*
14531451
* If S bit is 0, we only flush a single page. If S bit is set,

drivers/iommu/intel/iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5474,15 +5474,15 @@ intel_iommu_sva_invalidate(struct iommu_domain *domain, struct device *dev,
54745474
info->pfsid, pasid,
54755475
info->ats_qdep,
54765476
inv_info->addr_info.addr,
5477-
size, granu);
5477+
size);
54785478
break;
54795479
case IOMMU_CACHE_INV_TYPE_DEV_IOTLB:
54805480
if (info->ats_enabled)
54815481
qi_flush_dev_iotlb_pasid(iommu, sid,
54825482
info->pfsid, pasid,
54835483
info->ats_qdep,
54845484
inv_info->addr_info.addr,
5485-
size, granu);
5485+
size);
54865486
else
54875487
pr_warn_ratelimited("Passdown device IOTLB flush w/o ATS!\n");
54885488
break;

include/linux/intel-iommu.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ enum {
381381

382382
#define QI_DEV_EIOTLB_ADDR(a) ((u64)(a) & VTD_PAGE_MASK)
383383
#define QI_DEV_EIOTLB_SIZE (((u64)1) << 11)
384-
#define QI_DEV_EIOTLB_GLOB(g) ((u64)(g) & 0x1)
385384
#define QI_DEV_EIOTLB_PASID(p) ((u64)((p) & 0xfffff) << 32)
386385
#define QI_DEV_EIOTLB_SID(sid) ((u64)((sid) & 0xffff) << 16)
387386
#define QI_DEV_EIOTLB_QDEP(qd) ((u64)((qd) & 0x1f) << 4)
@@ -705,7 +704,7 @@ void qi_flush_piotlb(struct intel_iommu *iommu, u16 did, u32 pasid, u64 addr,
705704

706705
void qi_flush_dev_iotlb_pasid(struct intel_iommu *iommu, u16 sid, u16 pfsid,
707706
u32 pasid, u16 qdep, u64 addr,
708-
unsigned int size_order, u64 granu);
707+
unsigned int size_order);
709708
void qi_flush_pasid_cache(struct intel_iommu *iommu, u16 did, u64 granu,
710709
int pasid);
711710

0 commit comments

Comments
 (0)