qemu-patch-raspberry4/include
Peter Maydell 55a7cb144d accel/tcg: Check whether TLB entry is RAM consistently with how we set it up
We set up TLB entries in tlb_set_page_with_attrs(), where we have
some logic for determining whether the TLB entry is considered
to be RAM-backed, and thus has a valid addend field. When we
look at the TLB entry in get_page_addr_code(), we use different
logic for determining whether to treat the page as RAM-backed
and use the addend field. This is confusing, and in fact buggy,
because the code in tlb_set_page_with_attrs() correctly decides
that rom_device memory regions not in romd mode are not RAM-backed,
but the code in get_page_addr_code() thinks they are RAM-backed.
This typically results in "Bad ram pointer" assertion if the
guest tries to execute from such a memory region.

Fix this by making get_page_addr_code() just look at the
TLB_MMIO bit in the code_address field of the TLB, which
tlb_set_page_with_attrs() sets if and only if the addend
field is not valid for code execution.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180713150945.12348-1-peter.maydell@linaro.org
2018-08-14 17:17:19 +01:00
..
block block: Fix documentation for BDRV_REQ_MAY_UNMAP 2018-07-30 15:35:37 +02:00
chardev chardev: comment details for CLOSED event 2018-06-30 17:50:48 +02:00
crypto tests: call qcrypto_init instead of gnutls_global_init 2018-07-24 17:33:39 +01:00
disas RISC-V Disassembler 2018-03-07 08:30:28 +13:00
exec accel/tcg: Check whether TLB entry is RAM consistently with how we set it up 2018-08-14 17:17:19 +01:00
fpu fpu/softfloat: Specialize on snan_bit_is_one 2018-05-17 15:27:15 -07:00
hw nvic: Change NVIC to support ARMv6-M 2018-08-14 17:17:19 +01:00
io qio: non-default context for TLS handshake 2018-03-06 10:19:07 +00:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration typedefs: add QJSON 2018-06-15 14:40:56 +01:00
monitor monitor: Fix unsafe sharing of @cur_mon among threads 2018-07-23 14:00:03 +02:00
net net: Remove the deprecated "vlan" parameter 2018-05-14 15:47:14 +08:00
qapi qstring: Fix qstring_from_substr() not to provoke int overflow 2018-07-28 09:09:58 +02:00
qemu cutils: Do not include "qemu/units.h" directly 2018-07-02 15:41:17 +02:00
qom accel/tcg: Pass read access type through to io_readx() 2018-08-14 17:17:19 +01:00
scsi pr-manager: add query-pr-managers QMP command 2018-06-28 19:05:35 +02:00
standard-headers linux-headers: Update to kernel mainline commit b357bf602 2018-06-22 13:28:35 +01:00
sysemu Revert "block: Remove deprecated -drive geometry options" 2018-07-10 14:36:12 +02:00
ui Add gles support to egl-helpers, wire up in egl-headless and gtk. 2018-06-26 13:48:49 +02:00
elf.h linux-user: ARM-FDPIC: Identify ARM FDPIC binaries 2018-05-03 18:25:29 +02:00
glib-compat.h glib: enforce the minimum required version and warn about old APIs 2018-06-29 12:22:28 +01:00
qemu-common.h qemu-options: Bail out on unsupported options instead of silently ignoring them 2018-05-09 00:13:39 +02:00
qemu-io.h qemu-io: Let command functions return error code 2018-06-11 16:18:45 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00