]> git.proxmox.com Git - mirror_qemu.git/commit
memory: Add Error** argument to .log_global_start() handler
authorCédric Le Goater <clg@redhat.com>
Wed, 20 Mar 2024 06:49:05 +0000 (07:49 +0100)
committerPeter Xu <peterx@redhat.com>
Tue, 23 Apr 2024 22:36:01 +0000 (18:36 -0400)
commit3688fec8923101b3a44acde7f3db59b76f82b838
treec24798c11326ab3e97313d5bbee60f2577a1120e
parente4fa064d5610a96e50b49c1ea34c98ef12d0034a
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>
hw/i386/xen/xen-hvm.c
hw/vfio/common.c
hw/virtio/vhost.c
include/exec/memory.h
system/memory.c