diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-08-08 14:19:55 +1000 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2023-09-06 11:19:33 +0200 |
commit | cdab53dd223ca5417a70feedb6f8692e5c080aba (patch) | |
tree | cc645ca8ddbb364c48c0e0101914ade28142a334 /target/ppc/trace-events | |
parent | ea62f8a5172cf5fcd97df143b758730f6865a625 (diff) |
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 392d328abe753 ("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>
Diffstat (limited to 'target/ppc/trace-events')
0 files changed, 0 insertions, 0 deletions