[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 06/15] target/arm: ensure m-profile helpers set appropriate Me
From: |
Alex Bennée |
Subject: |
[PATCH v3 06/15] target/arm: ensure m-profile helpers set appropriate MemTxAttrs |
Date: |
Tue, 27 Sep 2022 15:14:55 +0100 |
There are a number of helpers for M-profile that deal with CPU
initiated access to the vector and stack areas. While it is unlikely
these coincided with memory mapped IO devices it is not inconceivable.
Embedded targets tend to attract all sorts of interesting code and for
completeness we should tag the transaction appropriately.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
target/arm/m_helper.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c
index 5ee4ee15b3..d244e9c1c5 100644
--- a/target/arm/m_helper.c
+++ b/target/arm/m_helper.c
@@ -184,7 +184,7 @@ static bool v7m_stack_write(ARMCPU *cpu, uint32_t addr,
uint32_t value,
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult txres;
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .attrs = MEMTXATTRS_CPU(cs) };
ARMMMUFaultInfo fi = {};
bool secure = mmu_idx & ARM_MMU_IDX_M_S;
int exc;
@@ -272,7 +272,7 @@ static bool v7m_stack_read(ARMCPU *cpu, uint32_t *dest,
uint32_t addr,
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult txres;
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .attrs = MEMTXATTRS_CPU(cs) };
ARMMMUFaultInfo fi = {};
bool secure = mmu_idx & ARM_MMU_IDX_M_S;
int exc;
@@ -665,7 +665,7 @@ static bool arm_v7m_load_vector(ARMCPU *cpu, int exc, bool
targets_secure,
MemTxResult result;
uint32_t addr = env->v7m.vecbase[targets_secure] + exc * 4;
uint32_t vector_entry;
- MemTxAttrs attrs = {};
+ MemTxAttrs attrs = MEMTXATTRS_CPU(cs);
ARMMMUIdx mmu_idx;
bool exc_secure;
@@ -1999,7 +1999,7 @@ static bool v7m_read_half_insn(ARMCPU *cpu, ARMMMUIdx
mmu_idx,
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
V8M_SAttributes sattrs = {};
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .attrs = MEMTXATTRS_CPU(cs) };
ARMMMUFaultInfo fi = {};
MemTxResult txres;
@@ -2048,7 +2048,7 @@ static bool v7m_read_sg_stack_word(ARMCPU *cpu, ARMMMUIdx
mmu_idx,
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult txres;
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .attrs = MEMTXATTRS_CPU(cs) };
ARMMMUFaultInfo fi = {};
uint32_t value;
@@ -2806,7 +2806,7 @@ uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr,
uint32_t op)
* inspecting the other MPU state.
*/
if (arm_current_el(env) != 0 || alt) {
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .attrs = MEMTXATTRS_CPU(env_cpu(env)) };
ARMMMUFaultInfo fi = {};
/* We can ignore the return value as prot is always set */
--
2.34.1
- Re: [PATCH v3 03/15] target/arm: ensure HVF traps set appropriate MemTxAttrs, (continued)
- [PATCH v3 08/15] hw/intc/gic: use MxTxAttrs to divine accessing CPU, Alex Bennée, 2022/09/27
- [PATCH v3 05/15] target/arm: ensure ptw accesses set appropriate MemTxAttrs, Alex Bennée, 2022/09/27
- [PATCH v3 10/15] configure: move detected gdb to TCG's config-host.mak, Alex Bennée, 2022/09/27
- [PATCH v3 04/15] target/arm: ensure KVM traps set appropriate MemTxAttrs, Alex Bennée, 2022/09/27
- [PATCH v3 07/15] qtest: make read/write operation appear to be from CPU, Alex Bennée, 2022/09/27
- [PATCH v3 06/15] target/arm: ensure m-profile helpers set appropriate MemTxAttrs,
Alex Bennée <=
- [PATCH v3 09/15] hw/timer: convert mptimer access to attrs to derive cpu index, Alex Bennée, 2022/09/27
- [PATCH v3 11/15] gdbstub: move into its own sub directory, Alex Bennée, 2022/09/27
- [PATCH v3 14/15] gdbstub: move guest debug support check to ops, Alex Bennée, 2022/09/27
- [PATCH v3 13/15] gdbstub: move breakpoint logic to accel ops, Alex Bennée, 2022/09/27
- [PATCH v3 12/15] gdbstub: move sstep flags probing into AccelClass, Alex Bennée, 2022/09/27
- [PATCH v3 15/15] accel/kvm: move kvm_update_guest_debug to inline stub, Alex Bennée, 2022/09/27