mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
memory: Add Error** argument to .log_global_start() handler
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> Link: https://lore.kernel.org/r/20240320064911.545001-10-clg@redhat.com [peterx: modify & enrich the comment for listener_add_address_space() ] Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
e4fa064d56
commit
3688fec892
5 changed files with 50 additions and 6 deletions
|
@ -457,11 +457,12 @@ static void xen_log_sync(MemoryListener *listener, MemoryRegionSection *section)
|
|||
int128_get64(section->size));
|
||||
}
|
||||
|
||||
static void xen_log_global_start(MemoryListener *listener)
|
||||
static bool xen_log_global_start(MemoryListener *listener, Error **errp)
|
||||
{
|
||||
if (xen_enabled()) {
|
||||
xen_in_migration = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static void xen_log_global_stop(MemoryListener *listener)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue