qemu-irix/include/exec
Peter Maydell f874bf905f exec: Handle multipage ranges in invalidate_and_set_dirty()
The code in invalidate_and_set_dirty() needs to handle addr/length
combinations which cross guest physical page boundaries. This can happen,
for example, when disk I/O reads large blocks into guest RAM which previously
held code that we have cached translations for. Unfortunately we were only
checking the clean/dirty status of the first page in the range, and then
were calling a tb_invalidate function which only handles ranges that don't
cross page boundaries. Fix the function to deal with multipage ranges.

The symptoms of this bug were that guest code would misbehave (eg segfault),
in particular after a guest reboot but potentially any time the guest
reused a page of its physical RAM for new code.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1416167061-13203-1-git-send-email-peter.maydell@linaro.org
2014-11-18 10:19:12 +00:00
..
user
address-spaces.h
cpu-all.h translate-all.c: memory walker initial address miscalculation 2014-10-06 21:53:35 +03:00
cpu-common.h softmmu: provide softmmu access type enum 2014-11-03 11:48:34 +00:00
cpu-defs.h implementing victim TLB for QEMU system emulated TLB 2014-09-01 17:43:06 +01:00
cpu_ldst.h softmmu: move all load/store functions to cpu_ldst.h 2014-06-05 16:10:33 +02:00
cpu_ldst_template.h softmmu: move all load/store functions to cpu_ldst.h 2014-06-05 16:10:33 +02:00
cputlb.h exec: Change memory_region_section_get_iotlb() argument to CPUState 2014-03-13 19:20:48 +01:00
exec-all.h cpu-exec: Make debug_excp_handler a QOM CPU method 2014-09-12 14:06:48 +01:00
gdbstub.h
gen-icount.h cpu: Move icount_decr field from CPU_COMMON to CPUState 2014-03-13 19:20:46 +01:00
helper-gen.h trace: [tcg] Include TCG-tracing helpers 2014-08-12 14:26:12 +01:00
helper-head.h tcg: Move size effects out of dh_arg 2014-05-28 09:33:55 -07:00
helper-proto.h trace: [tcg] Include TCG-tracing helpers 2014-08-12 14:26:12 +01:00
helper-tcg.h trace: [tcg] Include TCG-tracing helpers 2014-08-12 14:26:12 +01:00
hwaddr.h
ioport.h
memory-internal.h
memory.h Add skip_dump flag to ignore memory region during dump 2014-10-31 11:29:01 +01:00
poison.h
ram_addr.h exec: Handle multipage ranges in invalidate_and_set_dirty() 2014-11-18 10:19:12 +00:00
softmmu-semi.h
spinlock.h