qemu/target/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
..
arch_dump.c s390x: Use uint64_t for vector registers 2019-06-07 14:53:25 +02:00
cc_helper.c target/s390x: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
cpu_features_def.h s390x/cpumodel: Rework CPU feature definition 2019-06-21 15:26:53 +02:00
cpu_features_def.inc.h s390x/cpumodel: change internal name of vxpdeh to match description 2019-07-16 11:29:38 +02:00
cpu_features.c s390x/cpumodel: Rework CPU feature definition 2019-06-21 15:26:53 +02:00
cpu_features.h s390x/cpumodel: add Deflate-conversion facility 2019-05-21 16:59:16 +02:00
cpu_models.c s390x/cpumodel: Add the z15 name to the description of gen15a 2019-09-23 09:15:28 +02:00
cpu_models.h hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
cpu-param.h tcg: Split out target/arch/cpu-param.h 2019-06-10 07:03:34 -07:00
cpu-qom.h hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
cpu.c targets (various): use softfloat-helpers.h where we can 2019-08-19 12:07:13 +01:00
cpu.h s390x/tcg: Always use MMU_USER_IDX for CONFIG_USER_ONLY 2019-09-23 09:28:29 +02:00
crypto_helper.c s390x/tcg: introduce and use s390_program_interrupt() 2017-12-14 17:56:54 +01:00
diag.c target/s390x: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
excp_helper.c hw/s390x: Replace global smp variables with machine smp properties 2019-07-05 17:08:03 -03:00
fpu_helper.c target/s390x: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
gdbstub.c qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h 2019-06-11 20:22:09 +02:00
gen-features.c s390x/cpumodel: change internal name of vxpdeh to match description 2019-07-16 11:29:38 +02:00
helper.c s390x/mmu: ASC selection in s390_cpu_get_phys_page_debug() 2019-08-22 14:53:49 +02:00
helper.h s390x/tcg: MVST: Fix storing back the addresses to registers 2019-09-23 09:28:29 +02:00
insn-data.def s390x/tcg: MVST: Fix storing back the addresses to registers 2019-09-23 09:28:29 +02:00
insn-format.def s390x/tcg: Define vector instruction formats 2019-03-11 09:31:01 +01:00
int_helper.c target/s390x: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
internal.h s390x/tcg: Export float_comp_to_cc() and float(32|64|128)_dcmask() 2019-06-07 14:53:25 +02:00
interrupt.c qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h 2019-06-11 20:22:09 +02:00
ioinst.c s390x: handle exceptions during s390_cpu_virt_mem_rw() correctly (TCG) 2017-12-14 17:56:54 +01:00
kvm_s390x.h s390x/kvm: Configure page size after memory has actually been initialized 2019-04-25 13:47:01 +02:00
kvm-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
kvm.c s390: do not call memory_region_allocate_system_memory() multiple times 2019-09-30 13:51:50 +02:00
machine.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
Makefile.objs s390x/tcg: Implement VECTOR FP ADD 2019-06-07 14:53:25 +02:00
mem_helper.c s390x/tcg: MVO: Fault-safe handling 2019-09-23 09:28:29 +02:00
misc_helper.c target/s390x: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
mmu_helper.c s390x/mmu: Factor out storage key handling 2019-08-22 14:53:49 +02:00
s390-tod.h target/s390x: Split out s390-tod.h 2019-02-18 11:25:43 +01:00
sigp.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
tcg_s390x.h s390x/tcg: Introduce tcg_s390_vector_exception() 2019-06-07 14:53:25 +02:00
tcg-stub.c s390x/tcg: factor out and fix DATA exception injection 2018-10-04 10:32:39 +02:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
translate_vx.inc.c tcg: TCGMemOp is now accelerator independent MemOp 2019-09-03 08:30:38 -07:00
translate.c s390x/tcg: Always use MMU_USER_IDX for CONFIG_USER_ONLY 2019-09-23 09:28:29 +02:00
vec_fpu_helper.c s390x/tcg: Implement VECTOR FP TEST DATA CLASS IMMEDIATE 2019-06-07 14:53:26 +02:00
vec_helper.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
vec_int_helper.c s390x/tcg: Implement VECTOR TEST UNDER MASK 2019-05-17 10:54:13 +02:00
vec_string_helper.c s390x/tcg: Implement VECTOR STRING RANGE COMPARE 2019-06-07 14:53:25 +02:00
vec.h s390x/tcg: Implement VECTOR STRING RANGE COMPARE 2019-06-07 14:53:25 +02:00