[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/34] target/riscv: Fix privilege mode of G-stage translation for
From: |
Alistair Francis |
Subject: |
[PULL 33/34] target/riscv: Fix privilege mode of G-stage translation for debugging |
Date: |
Fri, 8 Mar 2024 21:11:51 +1000 |
From: Hiroaki Yamamoto <hrak1529@gmail.com>
G-stage translation should be considered to be user-level access in
riscv_cpu_get_phys_page_debug(), as already done in riscv_cpu_tlb_fill().
This fixes a bug that prevents gdb from reading memory while the VM is
running in VS-mode.
Signed-off-by: Hiroaki Yamamoto <hrak1529@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240228081028.35081-1-hrak1529@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
target/riscv/cpu_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index c994a72634..ce7322011d 100644
--- a/target/riscv/cpu_helper.c
+++ b/target/riscv/cpu_helper.c
@@ -1223,7 +1223,7 @@ hwaddr riscv_cpu_get_phys_page_debug(CPUState *cs, vaddr
addr)
if (env->virt_enabled) {
if (get_physical_address(env, &phys_addr, &prot, phys_addr, NULL,
- 0, mmu_idx, false, true, true)) {
+ 0, MMUIdx_U, false, true, true)) {
return -1;
}
}
--
2.44.0
- [PULL 23/34] tests: riscv64: Use 'zfa' instead of 'Zfa', (continued)
- [PULL 23/34] tests: riscv64: Use 'zfa' instead of 'Zfa', Alistair Francis, 2024/03/08
- [PULL 24/34] linux-headers: Update to Linux v6.8-rc6, Alistair Francis, 2024/03/08
- [PULL 25/34] target/riscv/kvm: update KVM exts to Linux 6.8, Alistair Francis, 2024/03/08
- [PULL 26/34] target/riscv: move ratified/frozen exts to non-experimental, Alistair Francis, 2024/03/08
- [PULL 27/34] target/riscv: mcountinhibit, mcounteren, scounteren, hcounteren is 32-bit, Alistair Francis, 2024/03/08
- [PULL 28/34] trans_rvv.c.inc: mark_vs_dirty() before loads and stores, Alistair Francis, 2024/03/08
- [PULL 29/34] trans_rvv.c.inc: remove 'is_store' bool from load/store fns, Alistair Francis, 2024/03/08
- [PULL 30/34] target/riscv: Fix shift count overflow, Alistair Francis, 2024/03/08
- [PULL 31/34] hw/intc/riscv_aplic: Fix setipnum_le write emulation for APLIC MSI-mode, Alistair Francis, 2024/03/08
- [PULL 32/34] hw/intc/riscv_aplic: Fix in_clrip[x] read emulation, Alistair Francis, 2024/03/08
- [PULL 33/34] target/riscv: Fix privilege mode of G-stage translation for debugging,
Alistair Francis <=
- [PULL 34/34] target/riscv: fix ACPI MCFG table, Alistair Francis, 2024/03/08
- Re: [PULL 00/34] riscv-to-apply queue, Peter Maydell, 2024/03/08