OSDN Git Service

virtio-mem: Update state to match bitmap as soon as it's been migrated
authorDavid Hildenbrand <david@redhat.com>
Tue, 26 Sep 2023 18:57:35 +0000 (20:57 +0200)
committerDavid Hildenbrand <david@redhat.com>
Thu, 12 Oct 2023 12:15:22 +0000 (14:15 +0200)
commit884a0c20e624275e2dc946c4b8abba9ccbaf4167
tree6d1d5121f5fcc73245dab90c419c5b319bf8002f
parenta45171dba74a376354746e0c83dc15616b42614f
virtio-mem: Update state to match bitmap as soon as it's been migrated

It's cleaner and future-proof to just have other state that depends on the
bitmap state to be updated as soon as possible when restoring the bitmap.

So factor out informing RamDiscardListener into a functon and call it in
case of early migration right after we restored the bitmap.

Message-ID: <20230926185738.277351-16-david@redhat.com>
Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
hw/virtio/virtio-mem.c