34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
|
|
From b5cee7126a75ea0e1797760fd5d7dfd89028b8a8 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Kunkun Jiang <jiangkunkun@huawei.com>
|
||
|
|
Date: Fri, 18 Nov 2022 15:22:14 +0800
|
||
|
|
Subject: [PATCH 02/36] Revert "vfio/common: Fix incorrect address alignment in
|
||
|
|
vfio_dma_map_ram_section"
|
||
|
|
|
||
|
|
This reverts commit c2a4ce033db6ab74256e28da382c797a98047d4b.
|
||
|
|
|
||
|
|
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
|
||
|
|
---
|
||
|
|
hw/vfio/common.c | 4 ++--
|
||
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
|
||
|
|
index 89c49f5508..65f3979492 100644
|
||
|
|
--- a/hw/vfio/common.c
|
||
|
|
+++ b/hw/vfio/common.c
|
||
|
|
@@ -1059,10 +1059,10 @@ static int vfio_dma_map_ram_section(VFIOContainer *container,
|
||
|
|
|
||
|
|
assert(memory_region_is_ram(section->mr));
|
||
|
|
|
||
|
|
- iova = REAL_HOST_PAGE_ALIGN(section->offset_within_address_space);
|
||
|
|
+ iova = TARGET_PAGE_ALIGN(section->offset_within_address_space);
|
||
|
|
llend = int128_make64(section->offset_within_address_space);
|
||
|
|
llend = int128_add(llend, section->size);
|
||
|
|
- llend = int128_and(llend, int128_exts64(qemu_real_host_page_mask));
|
||
|
|
+ llend = int128_and(llend, int128_exts64(TARGET_PAGE_MASK));
|
||
|
|
end = int128_get64(int128_sub(llend, int128_one()));
|
||
|
|
|
||
|
|
vaddr = memory_region_get_ram_ptr(section->mr) +
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|