diff mbox series

[SRU,08/13] swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single

Message ID 20211007180644.9187-9-khalid.elmously@canonical.com
State New
Headers show
Series Fix nvme errors w/ swiotlb in confidential VMs | expand

Commit Message

Khalid Elmously Oct. 7, 2021, 6:06 p.m. UTC
From: Christoph Hellwig <hch@lst.de>

BugLink: https://bugs.launchpad.net/bugs/1943902

swiotlb_tbl_map_single currently nevers sets a tlb_addr that is not
aligned to the tlb bucket size.  But we're going to add such a case
soon, for which this adjustment would be bogus.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jianxiong Gao <jxgao@google.com>
Tested-by: Jianxiong Gao <jxgao@google.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 16fc3cef33a04632ab6b31758abdd77563a20759)
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
---
 kernel/dma/swiotlb.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 5ae6c51f9ecbe..51a5ba7d7bd7e 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -648,7 +648,6 @@  void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr,
 
 	if (orig_addr == INVALID_PHYS_ADDR)
 		return;
-	orig_addr += (unsigned long)tlb_addr & (IO_TLB_SIZE - 1);
 
 	switch (target) {
 	case SYNC_FOR_CPU: