qemu/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
Kconfig kconfig: add CONFIG_MSI_NONBROKEN 2019-03-18 09:39:57 +01:00
Makefile.objs s390x: express dependencies with Kconfig 2019-03-07 21:46:19 +01: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 s390x: vmstatify config migration for virtio-ccw 2017-07-05 12:16:55 +02:00
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
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 s390x/pci: Drop release timer and replace it with a flag 2019-02-04 13:47:50 +01:00
s390-pci-inst.c memory: Access MemoryRegion with endianness 2019-09-03 08:30:39 -07:00
s390-pci-inst.h s390x/pci: add common function measurement block 2019-01-18 11:52:01 +01:00
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 s390x/storage attributes: fix CMMA_BLOCK_SIZE usage 2018-07-11 14:36:54 +02:00
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 s390x: rename s390-virtio.h to s390-virtio-hcall.h 2017-09-19 18:31:31 +02:00
s390-virtio-hcall.h s390/kvm_virtio/linux-headers: remove traces of old virtio transport 2017-11-24 10:52:05 +01:00
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 trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
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 s390x/ccw: make sure all ccw devices are properly reset 2018-05-14 17:10:02 +02:00