[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 34/43] target/hppa: Use MMU_DEBUG_LOAD when reloading
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 34/43] target/hppa: Use MMU_DEBUG_LOAD when reloading for CR[IIR] |
Date: |
Sun, 21 Jan 2018 19:42:08 -0800 |
Bypass any tlb protection checks, as this is not a "real"
access to memory per the architecture.
Signed-off-by: Richard Henderson <address@hidden>
---
target/hppa/int_helper.c | 2 +-
target/hppa/mem_helper.c | 19 ++++++++++++++-----
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c
index ee72769544..e831944b8d 100644
--- a/target/hppa/int_helper.c
+++ b/target/hppa/int_helper.c
@@ -154,7 +154,7 @@ void hppa_cpu_do_interrupt(CPUState *cs)
int prot, t;
vaddr = hppa_form_gva_psw(old_psw, iasq_f, iaoq_f & -4);
- t = hppa_get_physical_address(env, vaddr, 0, MMU_INST_FETCH,
+ t = hppa_get_physical_address(env, vaddr, 0, MMU_DEBUG_LOAD,
&paddr, &prot);
if (t >= 0) {
/* We can't re-load the instruction. */
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index a0a385cb54..4bdc4d77e5 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -131,12 +131,21 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr
addr, int mmu_idx,
/* ??? Check PSW_P and ent->access_prot. This can remove PROT_WRITE. */
/* Map MMUAccessType to QEMU protection. */
- if (ifetch) {
- a_prot = PROT_EXEC;
- } else if (type == MMU_DATA_STORE) {
- a_prot = PROT_WRITE;
- } else {
+ switch (type) {
+ case MMU_DATA_LOAD:
a_prot = PROT_READ;
+ break;
+ case MMU_DATA_STORE:
+ a_prot = PROT_WRITE;
+ break;
+ case MMU_INST_FETCH:
+ a_prot = PROT_EXEC;
+ break;
+ case MMU_DEBUG_LOAD:
+ ret = -1;
+ goto egress;
+ default:
+ g_assert_not_reached();
}
if (unlikely(!(prot & a_prot))) {
--
2.14.3
- [Qemu-devel] [PULL 27/43] target/hppa: Implement halt and reset instructions, (continued)
- [Qemu-devel] [PULL 27/43] target/hppa: Implement halt and reset instructions, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 25/43] target/hppa: Implement LCI, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 24/43] target/hppa: Implement LPA, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 30/43] target/hppa: Add migration for the cpu, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 28/43] target/hppa: Optimize for flat addressing space, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 31/43] target/hppa: Implement B,GATE insn, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 33/43] qom: Add MMU_DEBUG_LOAD, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 32/43] target/hppa: Only use EXCP_DTLB_MISS, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 29/43] target/hppa: Add system registers to gdbstub, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 35/43] target/hppa: Increase number of temp regs, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 34/43] target/hppa: Use MMU_DEBUG_LOAD when reloading for CR[IIR],
Richard Henderson <=
- [Qemu-devel] [PULL 36/43] target/hppa: Fix comment, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 37/43] target/hppa: Implement LDSID for system mode, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 38/43] target/hppa: Implement a pause instruction, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 39/43] target/hppa: Implement STWA, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 40/43] target/hppa: Enable MTTCG, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 43/43] hw/hppa: Add MAINTAINERS entry, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 41/43] hw/hppa: Implement DINO system board, Richard Henderson, 2018/01/21
- [Qemu-devel] [PULL 42/43] pc-bios: Add hppa-firmware.img and git submodule, Richard Henderson, 2018/01/21
- Re: [Qemu-devel] [PULL 00/43] Add hppa-softmmu, no-reply, 2018/01/21
- Re: [Qemu-devel] [PULL 00/43] Add hppa-softmmu, no-reply, 2018/01/21