qemu/target/ppc
Nicholas Piggin cdab53dd22 target/ppc: Fix CPU reservation migration for record-replay
ppc only migrates reserve_addr, so the destination machine can get a
valid reservation with an incorrect reservation value of 0. Prior to
commit 392d328abe ("target/ppc: Ensure stcx size matches larx"),
this could permit a stcx. to incorrectly succeed. That commit
inadvertently fixed that bug because the target machine starts with an
impossible reservation size of 0, so any stcx. will fail.

This behaviour is permitted by the ISA because reservation loss may
have implementation-dependent cause. What's more, with KVM machines it
is impossible save or reasonably restore reservation state. However if
the vmstate is being used for record-replay, the reservation must be
saved and restored exactly in order for execution from snapshot to
match the record.

This patch deprecates the existing incomplete reserve_addr vmstate,
and adds a new vmstate subsection with complete reservation state.
The new vmstate is needed only when record-replay mode is active.

Acked-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2023-09-06 11:19:33 +02:00
..
translate target/ppc: Use tcg_gen_negsetcond_* 2023-08-24 11:22:42 -07:00
arch_dump.c target: ppc: Use MSR_HVB bit to get the target endianness for memory dump 2023-07-07 04:46:12 -03:00
compat.c powerpc tcg: Fix Lesser GPL version number 2020-11-15 16:38:50 +01:00
cpu_init.c target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
cpu-models.c target/ppc: Add POWER9 DD2.2 model 2023-05-28 13:25:11 -03:00
cpu-models.h target/ppc: Add POWER9 DD2.2 model 2023-05-28 13:25:11 -03:00
cpu-param.h target/ppc: Remove NB_MMU_MODES define 2023-03-13 06:44:37 -07:00
cpu-qom.h target/ppc: Define TYPE_HOST_POWERPC_CPU in cpu-qom.h 2023-07-07 04:49:14 -03:00
cpu.c target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
cpu.h target/ppc: Fix CPU reservation migration for record-replay 2023-09-06 11:19:33 +02:00
dfp_helper.c target/ppc: Fix warning with clang-15 2023-02-27 22:29:01 +01:00
excp_helper.c ppc/vhyp: reset exception state when handling vhyp hcall 2023-09-06 11:19:33 +02:00
fpu_helper.c target/ppc: Merge COMPUTE_CLASS and COMPUTE_FPRF 2023-05-28 07:13:54 -03:00
gdbstub.c gdbstub: replace global gdb_has_xml with a function 2023-08-30 14:57:56 +01:00
helper_regs.c target: Widen pc/cs_base in cpu_get_tb_cpu_state 2023-06-26 17:32:59 +02:00
helper_regs.h target/ppc: Fix PMU hflags calculation 2023-06-10 10:19:24 -03:00
helper.h target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
insn32.decode target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs 2023-05-27 08:25:19 -03:00
insn64.decode target/ppc: Implemented [pm]xvbf16ger2* 2022-05-26 17:11:33 -03:00
int_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
internal.h target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
kvm_ppc.h target/ppc: Remove pointless checks of CONFIG_USER_ONLY in 'kvm_ppc.h' 2023-07-07 04:49:14 -03:00
kvm-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
kvm.c sysemu/kvm: Use vaddr for kvm_arch_[insert|remove]_hw_breakpoint 2023-08-24 11:21:35 -07:00
machine.c target/ppc: Fix CPU reservation migration for record-replay 2023-09-06 11:19:33 +02:00
mem_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
meson.build target/ppc: Only generate decodetree files when TCG is enabled 2023-07-07 04:18:26 -03:00
misc_helper.c target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
mmu_common.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
mmu_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
mmu-book3s-v3.c ppc: Check partition and process table alignment 2022-07-18 13:59:43 -03:00
mmu-book3s-v3.h target/ppc: Implement ISA 3.00 tlbie[l] 2022-07-18 13:59:43 -03:00
mmu-books.h target/ppc: introduce mmu-books.h 2021-07-09 10:38:19 +10:00
mmu-hash32.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
mmu-hash32.h target/ppc: Remove PowerPC 601 CPUs 2022-02-09 09:08:55 +01:00
mmu-hash64.c target/ppc: Fix VRMA page size for ISA v3.0 2023-08-04 12:22:03 -03:00
mmu-hash64.h target/ppc: Fix VRMA page size for ISA v3.0 2023-08-04 12:22:03 -03:00
mmu-radix64.c target/ppc: Generate storage interrupts for radix RC changes 2023-09-06 11:19:32 +02:00
mmu-radix64.h target/ppc: Check effective address validity 2022-01-04 07:55:34 +01:00
power8-pmu-regs.c.inc target/ppc: Inline gen_icount_io_start() 2023-06-05 12:04:29 -07:00
power8-pmu.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
power8-pmu.h target/ppc: Fix PMU hflags calculation 2023-06-10 10:19:24 -03:00
ppc-qmp-cmds.c ppc: spapr: cleanup cr get/set with helpers. 2023-05-05 12:34:22 -03:00
spr_common.h target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
tcg-stub.c target/ppc: created tcg-stub.c file 2021-06-03 13:22:06 +10:00
timebase_helper.c target/ppc: Add TFMR SPR implementation with read and write helpers 2023-07-07 04:18:26 -03:00
trace-events target/ppc: Improve KVM hypercall trace 2022-04-20 18:00:30 -03:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate.c target/ppc: Fix CPU reservation migration for record-replay 2023-09-06 11:19:33 +02:00
user_only_helper.c target/ppc: Implement ppc_cpu_record_sigsegv 2021-11-02 07:00:52 -04:00