qemu-e2k/hw/s390x
Igor Mammedov fb1fc5a82b s390: do not call memory_region_allocate_system_memory() multiple times
s390 was trying to solve limited KVM memslot size issue by abusing
memory_region_allocate_system_memory(), which breaks API contract
where the function might be called only once.

Beside an invalid use of API, the approach also introduced migration
issue, since RAM chunks for each KVM_SLOT_MAX_BYTES are transferred in
migration stream as separate RAMBlocks.

After discussion [1], it was agreed to break migration from older
QEMU for guest with RAM >8Tb (as it was relatively new (since 2.12)
and considered to be not actually used downstream).
Migration should keep working for guests with less than 8TB and for
more than 8TB with QEMU 4.2 and newer binary.
In case user tries to migrate more than 8TB guest, between incompatible
QEMU versions, migration should fail gracefully due to non-exiting
RAMBlock ID or RAMBlock size mismatch.

Taking in account above and that now KVM code is able to split too
big MemorySection into several memslots, partially revert commit
 (bb223055b s390-ccw-virtio: allow for systems larger that 7.999TB)
and use kvm_set_max_memslot_size() to set KVMSlot size to
KVM_SLOT_MAX_BYTES.

1) [PATCH RFC v2 4/4] s390: do not call  memory_region_allocate_system_memory() multiple times

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20190924144751.24149-5-imammedo@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2019-09-30 13:51:50 +02:00
..
3270-ccw.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ap-bridge.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
ap-device.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ccw-device.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ccw-device.h
css-bridge.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
css.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
event-facility.c s390x: sclp: refactor invalid command check 2019-09-30 13:51:49 +02:00
ipl.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
ipl.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
Kconfig
Makefile.objs
s390-ccw.c sysemu: Move the VMChangeStateEntry typedef to qemu/typedefs.h 2019-08-16 13:31:53 +02:00
s390-pci-bus.c s390: PCI: fix IOMMU region init 2019-09-30 13:51:49 +02:00
s390-pci-bus.h
s390-pci-inst.c memory: Access MemoryRegion with endianness 2019-09-03 08:30:39 -07:00
s390-pci-inst.h
s390-skeys-kvm.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
s390-skeys.c migration: register_savevm_live doesn't need dev 2019-09-12 11:15:03 +01:00
s390-stattrib-kvm.c
s390-stattrib.c migration: register_savevm_live doesn't need dev 2019-09-12 11:15:03 +01:00
s390-virtio-ccw.c s390: do not call memory_region_allocate_system_memory() multiple times 2019-09-30 13:51:50 +02:00
s390-virtio-hcall.c
s390-virtio-hcall.h
sclp.c s390x: sclp: Report insufficient SCCB length 2019-09-30 13:51:50 +02:00
sclpcpu.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
sclpquiesce.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
tod-kvm.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
tod-qemu.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
tod.c migration: register_savevm_live doesn't need dev 2019-09-12 11:15:03 +01:00
trace-events
vhost-vsock-ccw.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-9p.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-balloon.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-blk.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-crypto.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-gpu.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-input.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-net.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-rng.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-scsi.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw-serial.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-ccw.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
virtio-ccw.h