Skip to content

Commit c8acb28

Browse files
committed
iommu/vt-d: Allow to flush more than 4GB of device TLBs
The shift qi_flush_dev_iotlb() is done on an int, which limits the mask to 32 bits. Make the mask 64 bits wide so that more than 4GB of address range can be flushed at once. Signed-off-by: Joerg Roedel <[email protected]>
1 parent 9003d61 commit c8acb28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/dmar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
13431343

13441344
if (mask) {
13451345
BUG_ON(addr & ((1 << (VTD_PAGE_SHIFT + mask)) - 1));
1346-
addr |= (1 << (VTD_PAGE_SHIFT + mask - 1)) - 1;
1346+
addr |= (1ULL << (VTD_PAGE_SHIFT + mask - 1)) - 1;
13471347
desc.high = QI_DEV_IOTLB_ADDR(addr) | QI_DEV_IOTLB_SIZE;
13481348
} else
13491349
desc.high = QI_DEV_IOTLB_ADDR(addr);

0 commit comments

Comments
 (0)