- arm/virt: Fix vcpu hotplug idx_from_topo_ids - Revert patches related to the vSVA - sync some bugfix patches from upstream - add generic vDPA device support Signed-off-by: yezengruan <yezengruan@huawei.com> (cherry picked from commit b99dbfd9847104300672fb4f559f1c2abba8aa33)
64 lines
2.1 KiB
Diff
64 lines
2.1 KiB
Diff
From 9664a2d7b040a41d75067f4c58bf72c705e4a13b Mon Sep 17 00:00:00 2001
|
|
From: Kunkun Jiang <jiangkunkun@huawei.com>
|
|
Date: Fri, 18 Nov 2022 15:22:23 +0800
|
|
Subject: [PATCH 07/36] Revert "vfio: Introduce helpers to mark dirty pages of
|
|
a RAM section"
|
|
|
|
This reverts commit 1675d767aa9bd496178b4d74e01a40dbbd97eccb.
|
|
|
|
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
|
|
---
|
|
hw/vfio/common.c | 22 ++++++++--------------
|
|
1 file changed, 8 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
|
|
index 6136b1ef61..bdfcc854fe 100644
|
|
--- a/hw/vfio/common.c
|
|
+++ b/hw/vfio/common.c
|
|
@@ -1566,19 +1566,6 @@ err_out:
|
|
return ret;
|
|
}
|
|
|
|
-static int vfio_dma_sync_ram_section_dirty_bitmap(VFIOContainer *container,
|
|
- MemoryRegionSection *section)
|
|
-{
|
|
- ram_addr_t ram_addr;
|
|
-
|
|
- ram_addr = memory_region_get_ram_addr(section->mr) +
|
|
- section->offset_within_region;
|
|
-
|
|
- return vfio_get_dirty_bitmap(container,
|
|
- REAL_HOST_PAGE_ALIGN(section->offset_within_address_space),
|
|
- int128_get64(section->size), ram_addr);
|
|
-}
|
|
-
|
|
typedef struct {
|
|
IOMMUNotifier n;
|
|
VFIOGuestIOMMU *giommu;
|
|
@@ -1663,6 +1650,8 @@ static int vfio_sync_ram_discard_listener_dirty_bitmap(VFIOContainer *container,
|
|
static int vfio_sync_dirty_bitmap(VFIOContainer *container,
|
|
MemoryRegionSection *section)
|
|
{
|
|
+ ram_addr_t ram_addr;
|
|
+
|
|
if (memory_region_is_iommu(section->mr)) {
|
|
VFIOGuestIOMMU *giommu;
|
|
|
|
@@ -1693,7 +1682,12 @@ static int vfio_sync_dirty_bitmap(VFIOContainer *container,
|
|
return vfio_sync_ram_discard_listener_dirty_bitmap(container, section);
|
|
}
|
|
|
|
- return vfio_dma_sync_ram_section_dirty_bitmap(container, section);
|
|
+ ram_addr = memory_region_get_ram_addr(section->mr) +
|
|
+ section->offset_within_region;
|
|
+
|
|
+ return vfio_get_dirty_bitmap(container,
|
|
+ REAL_HOST_PAGE_ALIGN(section->offset_within_address_space),
|
|
+ int128_get64(section->size), ram_addr);
|
|
}
|
|
|
|
static void vfio_listener_log_sync(MemoryListener *listener,
|
|
--
|
|
2.27.0
|
|
|