[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/9] vfio/migration: Rename vfio_devices_all_dirty_tracking()
From: |
Joao Martins |
Subject: |
Re: [PATCH 6/9] vfio/migration: Rename vfio_devices_all_dirty_tracking() |
Date: |
Mon, 16 Dec 2024 12:58:17 +0000 |
On 16/12/2024 09:46, Avihai Horon wrote:
> 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.
>
Yes! :)
> Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.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 6e4654218a..dd8c5c52b5 100644
> --- a/hw/vfio/common.c
> +++ b/hw/vfio/common.c
> @@ -195,7 +195,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;
>
> @@ -1368,7 +1368,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);
- Re: [PATCH 5/9] vfio/migration: Drop vfio_dma_unmap_dirty_sync_needed(), (continued)
- [PATCH 8/9] migration: Drop migration_is_device(), Avihai Horon, 2024/12/16
- [PATCH 6/9] vfio/migration: Rename vfio_devices_all_dirty_tracking(), Avihai Horon, 2024/12/16
- Re: [PATCH 6/9] vfio/migration: Rename vfio_devices_all_dirty_tracking(),
Joao Martins <=
- [PATCH 9/9] migration: Unexport migration_is_active(), Avihai Horon, 2024/12/16
- [PATCH 1/9] vfio/container: Add dirty tracking started flag, Avihai Horon, 2024/12/16
- Re: [PATCH 0/9] migration: Drop/unexport migration_is_device() and migration_is_active(), Joao Martins, 2024/12/16