[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_start() handler
- To: Peter Xu <peterx@xxxxxxxxxx>
- From: Cédric Le Goater <clg@xxxxxxxxxx>
- Date: Wed, 20 Mar 2024 17:15:06 +0100
- Cc: qemu-devel@xxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Fabiano Rosas <farosas@xxxxxxx>, Avihai Horon <avihaih@xxxxxxxxxx>, Markus Armbruster <armbru@xxxxxxxxxx>, Prasad Pandit <pjp@xxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 20 Mar 2024 16:15:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 3/20/24 15:42, Peter Xu wrote:
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@xxxxxxxxxx>
Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>
Cc: Paul Durrant <paul@xxxxxxx>
Cc: "Michael S. Tsirkin" <mst@xxxxxxxxxx>
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: Cédric Le Goater <clg@xxxxxxxxxx>
Reviewed-by: Peter Xu <peterx@xxxxxxxxxx>
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.
*/
Sure, or I will in a v6. Markus had a comment on 8/14.
Thanks,
C.
|