[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-9.1 v5 09/14] memory: Add Error** argument to .log_global
From: |
Peter Xu |
Subject: |
Re: [PATCH for-9.1 v5 09/14] memory: Add Error** argument to .log_global_start() handler |
Date: |
Wed, 20 Mar 2024 10:42:24 -0400 |
On Wed, Mar 20, 2024 at 07:49:05AM +0100, Cédric Le Goater wrote:
> Modify all .log_global_start() handlers to take an Error** parameter
> and return a bool. Adapt memory_global_dirty_log_start() to interrupt
> on the first error the loop on handlers. In such case, a rollback is
> performed to stop dirty logging on all listeners where it was
> previously enabled.
>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Paul Durrant <paul@xen.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: David Hildenbrand <david@redhat.com>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Still one comment below:
> @@ -3014,8 +3044,11 @@ static void listener_add_address_space(MemoryListener
> *listener,
> listener->begin(listener);
> }
> if (global_dirty_tracking) {
> + /*
> + * Migration has already started. Assert on any error.
If you won't mind, I can change this to:
/*
* Currently only VFIO can fail log_global_start(), and it's not allowed
* to hotplug a VFIO device during migration, so this should never fail
* when invoked. If it can start to fail in the future, we need to be
* able to fail the whole listener_add_address_space() and its callers.
*/
Thanks,
> + */
> if (listener->log_global_start) {
> - listener->log_global_start(listener);
> + listener->log_global_start(listener, &error_abort);
> }
> }
>
> --
> 2.44.0
>
--
Peter Xu
- [PATCH for-9.1 v5 03/14] migration: Always report an error in block_save_setup(), (continued)
- [PATCH for-9.1 v5 03/14] migration: Always report an error in block_save_setup(), Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 05/14] migration: Add Error** argument to vmstate_save(), Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 06/14] migration: Add Error** argument to qemu_savevm_state_setup(), Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 04/14] migration: Always report an error in ram_save_setup(), Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 08/14] migration: Add Error** argument to .load_setup() handler, Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 07/14] migration: Add Error** argument to .save_setup() handler, Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 09/14] memory: Add Error** argument to .log_global_start() handler, Cédric Le Goater, 2024/03/20
- Re: [PATCH for-9.1 v5 09/14] memory: Add Error** argument to .log_global_start() handler,
Peter Xu <=
- [PATCH for-9.1 v5 10/14] migration: Introduce ram_bitmaps_destroy(), Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 12/14] migration: Add Error** argument to ram_state_init(), Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 13/14] migration: Add Error** argument to xbzrle_init(), Cédric Le Goater, 2024/03/20
- [PATCH for-9.1 v5 11/14] memory: Add Error** argument to the global_dirty_log routines, Cédric Le Goater, 2024/03/20