[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.0.4 62/71] accel/tcg: Fix user-only probe_access_internal plug
From: |
Michael Tokarev |
Subject: |
[Stable-9.0.4 62/71] accel/tcg: Fix user-only probe_access_internal plugin check |
Date: |
Tue, 19 Nov 2024 00:08:19 +0300 |
From: Richard Henderson <richard.henderson@linaro.org>
The acc_flag check for write should have been against PAGE_WRITE_ORG,
not PAGE_WRITE. But it is better to combine two acc_flag checks
to a single check against access_type. This matches the system code
in cputlb.c.
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2647
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: 20241111145002.144995-1-richard.henderson@linaro.org
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
(cherry picked from commit 2a339fee450638b512c5122281cb5ab49331cfb8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 3cac3a78c4..50a9d32bd3 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -796,7 +796,7 @@ static int probe_access_internal(CPUArchState *env, vaddr
addr,
if (guest_addr_valid_untagged(addr)) {
int page_flags = page_get_flags(addr);
if (page_flags & acc_flag) {
- if ((acc_flag == PAGE_READ || acc_flag == PAGE_WRITE)
+ if (access_type != MMU_INST_FETCH
&& cpu_plugin_mem_cbs_enabled(env_cpu(env))) {
return TLB_MMIO;
}
--
2.39.5
- [Stable-9.0.4 v2 00/71] Patch Round-up for stable 9.0.4, freeze on 2024-11-18, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 58/71] target/i386: Fix legacy page table walk, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 59/71] hw/i386/pc: Don't try to init PCI NICs if there is no PCI bus, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 61/71] target/arm: Drop user-only special case in sve_stN_r, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 64/71] linux-user/arm: Reduce vdso alignment to 4k, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 60/71] linux-user: Fix setreuid and setregid to use direct syscalls, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 62/71] accel/tcg: Fix user-only probe_access_internal plugin check,
Michael Tokarev <=
- [Stable-9.0.4 67/71] target/i386: fix hang when using slow path for ptw_setl, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 63/71] linux-user: Tolerate CONFIG_LSM_MMAP_MIN_ADDR, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 65/71] linux-user/arm: Select vdso for be8 and be32 modes, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 70/71] hw/audio/hda: fix memory leak on audio setup, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 69/71] hw/misc/mos6522: Fix bad class definition of the MOS6522 device, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 66/71] tcg: Allow top bit of SIMD_DATA_BITS to be set in simd_desc(), Michael Tokarev, 2024/11/18
- [Stable-9.0.4 68/71] contrib/plugins: add compat for g_memdup2, Michael Tokarev, 2024/11/18
- [Stable-9.0.4 71/71] usb-hub: Fix handling port power control messages, Michael Tokarev, 2024/11/18