qemu-e2k/include/exec
Nicholas Piggin 03bfc2188f physmem: Fix migration dirty bitmap coherency with TCG memory access
The fastpath in cpu_physical_memory_sync_dirty_bitmap() to test large
aligned ranges forgot to bring the TCG TLB up to date after clearing
some of the dirty memory bitmap bits. This can result in stores though
the TCG TLB not setting the dirty memory bitmap and ultimately causes
memory corruption / lost updates during migration from a TCG host.

Fix this by calling cpu_physical_memory_dirty_bits_cleared() when
dirty bits have been cleared.

Fixes: aa8dc04477 ("migration: synchronize memory bitmap 64bits at a time")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240219061731.232570-1-npiggin@gmail.com>
[PMD: Split patch in 2: part 2/2, slightly adapt description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Link: https://lore.kernel.org/r/20240312201458.79532-4-philmd@linaro.org
Signed-off-by: Peter Xu <peterx@redhat.com>
2024-03-12 17:39:40 -04:00
..
user thunk: Delete checks for old host definitions 2023-09-15 05:26:50 -07:00
address-spaces.h exec/address-spaces.h: Remove unuseful 'exec/memory.h' include 2023-08-31 19:47:43 +02:00
confidential-guest-support.h
cpu_ldst.h include/exec: typedef abi_ptr to vaddr 2024-01-29 07:06:03 +10:00
cpu-all.h accel/tcg: Add TLB_CHECK_ALIGNED 2024-03-05 13:22:56 +00:00
cpu-common.h cpu: Remove page_size_init 2024-02-29 11:35:37 -10:00
cpu-defs.h accel/tcg: Move CPUTLB definitions from cpu-defs.h 2023-10-03 08:01:02 -07:00
cputlb.h accel/tcg: Move HMP info jit and info opcount code 2023-11-06 08:27:21 -08:00
exec-all.h physmem: Expose tlb_reset_dirty_range_all() 2024-03-12 17:39:40 -04:00
gdbstub.h gdbstub: expose api to find registers 2024-02-28 09:11:42 +00:00
helper-gen-common.h tcg: Split helper-gen.h 2023-06-05 12:04:29 -07:00
helper-gen.h tcg: Split helper-gen.h 2023-06-05 12:04:29 -07:00
helper-gen.h.inc tcg: Split helper-gen.h 2023-06-05 12:04:29 -07:00
helper-head.h tcg: Move env defines out of NEED_CPU_H in helper-head.h 2023-06-05 12:04:29 -07:00
helper-info.c.inc tcg: Pass TCGHelperInfo to tcg_gen_callN 2023-06-05 12:04:29 -07:00
helper-proto-common.h tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00
helper-proto.h tcg: Split helper-proto.h 2023-06-05 12:04:29 -07:00
helper-proto.h.inc tcg: Split helper-proto.h 2023-06-05 12:04:29 -07:00
hwaddr.h bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
ioport.h exec/ioport: Add portio_list_set_enabled() 2024-02-14 06:09:32 -05:00
log.h
memattrs.h accel/tcg: Add tlb_fill_flags to CPUTLBEntryFull 2024-03-05 13:22:56 +00:00
memop.h include/exec/memop: Add MO_ATOM_* 2023-05-16 15:21:38 -07:00
memopidx.h
memory_ldst_cached.h.inc
memory_ldst_phys.h.inc
memory_ldst.h.inc bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
memory-internal.h exec/memory: Expose memory_region_access_valid() 2023-01-09 13:50:13 +01:00
memory.h include/exec/memory.h: correct typos 2024-02-21 08:16:43 +03:00
page-vary.h bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
plugin-gen.h plugins: Set final instruction count in plugin_gen_tb_end 2023-10-11 08:46:39 +01:00
poison.h accel: Remove HAX accelerator 2023-08-31 19:46:43 +02:00
ram_addr.h physmem: Fix migration dirty bitmap coherency with TCG memory access 2024-03-12 17:39:40 -04:00
ramblock.h migration/ram: Add outgoing 'mapped-ram' migration 2024-03-01 15:42:04 +08:00
ramlist.h
replay-core.h replay: Extract core API to 'exec/replay-core.h' 2023-02-27 22:29:01 +01:00
target_long.h tcg: Define MO_TL 2023-10-22 16:34:21 -07:00
target_page.h softmmu: Introduce qemu_target_page_mask() helper 2023-06-23 02:54:44 -04:00
tb-flush.h accel/tcg: Declare tcg_flush_jmp_cache() in 'exec/tb-flush.h' 2023-11-07 12:13:27 +01:00
tlb-common.h tcg: Add tlb_fast_offset to TCGContext 2023-06-05 12:04:28 -07:00
translate-all.h accel/tcg: Remove tb_invalidate_phys_page() from system emulation 2024-01-19 12:28:59 +01:00
translation-block.h tcg: Make tb_cflags() usable from target-agnostic code 2024-01-29 21:04:10 +10:00
translator.h include/exec: Use vaddr in DisasContextBase for virtual addresses 2024-01-29 07:06:03 +10:00
tswap.h include/exec: Provide the tswap() functions for target independent code, too 2023-04-20 11:25:32 +02:00
vaddr.h include/exec: Move vaddr defines to separate file 2024-01-29 07:06:03 +10:00