David Hildenbrand <da...@redhat.com> wrote: > The bitmap and the size are immutable while migration is active: see > virtio_mem_is_busy(). We can migrate this information early, before > migrating any actual RAM content. Further, all information we need for > sanity checks is immutable as well. > > Having this information in place early will, for example, allow for > properly preallocating memory before touching these memory locations > during RAM migration: this way, we can make sure that all memory was > actually preallocated and that any user errors (e.g., insufficient > hugetlb pages) can be handled gracefully. > > In contrast, usable_region_size and requested_size can theoretically > still be modified on the source while the VM is running. Keep migrating > these properties the usual, late, way. > > Use a new device property to keep behavior of compat machines > unmodified. > > Signed-off-by: David Hildenbrand <da...@redhat.com>
Reviewed-by: Juan Quintela <quint...@redhat.com> > diff --git a/hw/core/machine.c b/hw/core/machine.c > index 616f3a207c..29b57f6448 100644 > --- a/hw/core/machine.c > +++ b/hw/core/machine.c > @@ -41,7 +41,9 @@ > #include "hw/virtio/virtio-pci.h" > #include "qom/object_interfaces.h" > > -GlobalProperty hw_compat_7_2[] = {}; > +GlobalProperty hw_compat_7_2[] = { > + { "virtio-mem", "x-early-migration", "false" }, > +}; We can stop prettending that we don't support this kind of properties O:-)