[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 34/45] target/hppa: Use MMU_DEBUG_LOAD when reloa
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v3 34/45] target/hppa: Use MMU_DEBUG_LOAD when reloading for CR[IIR] |
Date: |
Wed, 24 Jan 2018 15:26:14 -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 d54d830196..1a9bbe268a 100644
--- a/target/hppa/int_helper.c
+++ b/target/hppa/int_helper.c
@@ -156,7 +156,7 @@ void hppa_cpu_do_interrupt(CPUState *cs)
vaddr = hppa_form_gva_psw(old_psw, iasq_f, vaddr);
t = hppa_get_physical_address(env, vaddr, 0,
- MMU_INST_FETCH,
+ 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 81bcbe45db..4decfca407 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] [PATCH v3 26/45] target/hppa: Implement SYNCDMA insn, (continued)
- [Qemu-devel] [PATCH v3 26/45] target/hppa: Implement SYNCDMA insn, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 24/45] target/hppa: Implement LPA, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 22/45] target/hppa: Implement P*TLB and P*TLBE insns, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 27/45] target/hppa: Implement halt and reset instructions, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 28/45] target/hppa: Optimize for flat addressing space, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 31/45] target/hppa: Implement B,GATE insn, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 29/45] target/hppa: Add system registers to gdbstub, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 30/45] target/hppa: Add migration for the cpu, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 33/45] qom: Add MMU_DEBUG_LOAD, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 32/45] target/hppa: Only use EXCP_DTLB_MISS, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 34/45] target/hppa: Use MMU_DEBUG_LOAD when reloading for CR[IIR],
Richard Henderson <=
- [Qemu-devel] [PATCH v3 35/45] target/hppa: Increase number of temp regs, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 36/45] target/hppa: Fix comment, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 38/45] target/hppa: Implement a pause instruction, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 39/45] target/hppa: Implement STWA, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 37/45] target/hppa: Implement LDSID for system mode, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 40/45] target/hppa: Enable MTTCG, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 41/45] hw/hppa: Implement DINO system board, Richard Henderson, 2018/01/24
- [Qemu-devel] [PATCH v3 44/45] target/hppa: Fix 32-bit operand masks for 0E FCVT, Richard Henderson, 2018/01/24