qemu-e2k/target/s390x
Philippe Mathieu-Daudé 744c72a837 cpu: Rename CPUClass vmsd -> legacy_vmsd
Quoting Peter Maydell [*]:

  There are two ways to handle migration for
  a CPU object:

  (1) like any other device, so it has a dc->vmsd that covers
  migration for the whole object. As usual for objects that are a
  subclass of a parent that has state, the first entry in the
  VMStateDescription field list is VMSTATE_CPU(), which migrates
  the cpu_common fields, followed by whatever the CPU's own migration
  fields are.

  (2) a backwards-compatible mechanism for CPUs that were
  originally migrated using manual "write fields to the migration
  stream structures". The on-the-wire migration format
  for those is based on the 'env' pointer (which isn't a QOM object),
  and the cpu_common part of the migration data is elsewhere.

  cpu_exec_realizefn() handles both possibilities:

  * for type 1, dc->vmsd is set and cc->vmsd is not,
    so cpu_exec_realizefn() does nothing, and the standard
    "register dc->vmsd for a device" code does everything needed

  * for type 2, dc->vmsd is NULL and so we register the
    vmstate_cpu_common directly to handle the cpu-common fields,
    and the cc->vmsd to handle the per-CPU stuff

  You can't change a CPU from one type to the other without breaking
  migration compatibility, which is why some guest architectures
  are stuck on the cc->vmsd form. New targets should use dc->vmsd.

To avoid new targets to start using type (2), rename cc->vmsd as
cc->legacy_vmsd. The correct field to implement is dc->vmsd (the
DeviceClass one).

See also commit b170fce3dd ("cpu: Register VMStateDescription
through CPUState") for historic background.

[*] https://www.mail-archive.com/qemu-devel@nongnu.org/msg800849.html

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210517105140.1062037-13-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2021-05-26 15:33:59 -07:00
..
arch_dump.c target/s390x/arch_dump: Fix warning for the name field in the PT_NOTE section 2021-03-04 11:23:35 +01:00
cc_helper.c target/s390x: Improve SUB LOGICAL WITH BORROW 2020-12-21 18:11:33 +01:00
cpu-param.h
cpu-qom.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
cpu.c cpu: Rename CPUClass vmsd -> legacy_vmsd 2021-05-26 15:33:59 -07:00
cpu.h s390x: move S390_ADAPTER_SUPPRESSIBLE 2021-03-26 09:33:50 +01:00
cpu_features.c s390x: pv: Fence additional unavailable SCLP facilities for PV guests 2020-12-21 18:11:32 +01:00
cpu_features.h s390x: pv: Fix diag318 PV fencing 2020-10-22 15:47:27 +02:00
cpu_features_def.h
cpu_features_def.h.inc s390x/cpumodel: S390_FEAT_MISC_INSTRUCTION_EXT -> S390_FEAT_MISC_INSTRUCTION_EXT2 2020-10-02 13:52:49 +02:00
cpu_models.c s390x/cpu_model: use official name for 8562 2021-03-15 11:01:23 +01:00
cpu_models.h
crypto_helper.c
diag.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
excp_helper.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
fpu_helper.c
gdbstub.c
gen-features.c s390x/tcg: Implement CIPHER MESSAGE WITH AUTHENTICATION (KMA) 2020-10-02 13:52:49 +02:00
helper.c target/s390x: Improve SUB LOGICAL WITH BORROW 2020-12-21 18:11:33 +01:00
helper.h target/s390x: Store r1/r2 for page-translation exceptions during MVPG 2021-03-15 11:03:20 +01:00
insn-data.def target/s390x: Store r1/r2 for page-translation exceptions during MVPG 2021-03-15 11:03:20 +01:00
insn-format.def
int_helper.c
internal.h target/s390x: Improve SUB LOGICAL WITH BORROW 2020-12-21 18:11:33 +01:00
interrupt.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
ioinst.c css: SCHIB measurement block origin must be aligned 2021-03-04 11:23:35 +01:00
kvm-stub.c s390/kvm: fix diag318 propagation and reset functionality 2020-11-18 16:57:48 +01:00
kvm.c s390x/kvm: Get rid of legacy_s390_alloc() 2021-03-15 11:01:23 +01:00
kvm_s390x.h s390/kvm: fix diag318 propagation and reset functionality 2020-11-18 16:57:48 +01:00
machine.c s390: guest support for diagnose 0x318 2020-10-02 13:52:49 +02:00
mem_helper.c target/s390x: fix s390_probe_access to check PAGE_WRITE_ORG for writeability 2021-04-23 14:10:56 +01:00
meson.build target/s390x: fix meson.build issue 2020-08-21 11:55:13 -04:00
misc_helper.c s390x: Use strpadcpy for copying vm name 2021-01-21 11:19:45 +01:00
mmu_helper.c s390x: do not use ram_size global 2020-12-10 12:15:09 -05:00
s390-tod.h
sigp.c
tcg-stub.c
tcg_s390x.h
trace-events
trace.h
translate.c target/s390x: Fix translation exception on illegal instruction 2021-05-20 14:19:30 +02:00
translate_vx.c.inc
vec.h
vec_fpu_helper.c
vec_helper.c
vec_int_helper.c
vec_string_helper.c