[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/17] vfio/migration: Rename vfio_devices_all_dirty_tracking()
From: |
Cédric Le Goater |
Subject: |
[PULL 14/17] vfio/migration: Rename vfio_devices_all_dirty_tracking() |
Date: |
Tue, 24 Dec 2024 16:15:44 +0100 |
From: Avihai Horon <avihaih@nvidia.com>
vfio_devices_all_dirty_tracking() is used to check if dirty page log
sync is needed. However, besides checking the dirty page tracking
status, it also checks the pre_copy_dirty_page_tracking flag.
Rename it to vfio_devices_log_sync_needed() which reflects its purpose
more accurately and makes the code clearer as there are already several
helpers with similar names.
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Tested-by: Joao Martins <joao.m.martins@oracle.com>
Link: 20241218134022.21264-5-avihaih@nvidia.com">https://lore.kernel.org/r/20241218134022.21264-5-avihaih@nvidia.com
Signed-off-by: Cédric Le Goater <clg@redhat.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
9b5524377ce01a0a982157b314ad60add371bac6..f7499a9b7447a7593198e1523c50858b70a8bd85
100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -191,7 +191,7 @@ bool vfio_devices_all_dirty_tracking_started(
bcontainer->dirty_pages_started;
}
-static bool vfio_devices_all_dirty_tracking(VFIOContainerBase *bcontainer)
+static bool vfio_log_sync_needed(const VFIOContainerBase *bcontainer)
{
VFIODevice *vbasedev;
@@ -1364,7 +1364,7 @@ static void vfio_listener_log_sync(MemoryListener
*listener,
return;
}
- if (vfio_devices_all_dirty_tracking(bcontainer)) {
+ if (vfio_log_sync_needed(bcontainer)) {
ret = vfio_sync_dirty_bitmap(bcontainer, section, &local_err);
if (ret) {
error_report_err(local_err);
--
2.47.1
- [PULL 05/17] vfio/igd: add Gemini Lake and Comet Lake device ids, (continued)
- [PULL 05/17] vfio/igd: add Gemini Lake and Comet Lake device ids, Cédric Le Goater, 2024/12/24
- [PULL 03/17] vfio/igd: align generation with i915 kernel driver, Cédric Le Goater, 2024/12/24
- [PULL 06/17] vfio/igd: add Alder/Raptor/Rocket/Ice/Jasper Lake device ids, Cédric Le Goater, 2024/12/24
- [PULL 08/17] vfio/igd: emulate GGC register in mmio bar0, Cédric Le Goater, 2024/12/24
- [PULL 10/17] vfio/igd: add x-igd-gms option back to set DSM region size for guest, Cédric Le Goater, 2024/12/24
- [PULL 09/17] vfio/igd: emulate BDSM in mmio bar0 for gen 6-10 devices, Cédric Le Goater, 2024/12/24
- [PULL 12/17] vfio/migration: Refactor vfio_devices_all_dirty_tracking() logic, Cédric Le Goater, 2024/12/24
- [PULL 13/17] vfio/migration: Refactor vfio_devices_all_running_and_mig_active() logic, Cédric Le Goater, 2024/12/24
- [PULL 07/17] vfio/igd: add macro for declaring mirrored registers, Cédric Le Goater, 2024/12/24
- [PULL 11/17] vfio/container: Add dirty tracking started flag, Cédric Le Goater, 2024/12/24
- [PULL 14/17] vfio/migration: Rename vfio_devices_all_dirty_tracking(),
Cédric Le Goater <=
- [PULL 16/17] migration: Drop migration_is_device(), Cédric Le Goater, 2024/12/24
- [PULL 15/17] system/dirtylimit: Don't use migration_is_active(), Cédric Le Goater, 2024/12/24
- [PULL 17/17] migration: Unexport migration_is_active(), Cédric Le Goater, 2024/12/24
- Re: [PULL 00/17] vfio queue, Stefan Hajnoczi, 2024/12/25