qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/2] target/arm: Always return ARMASIdx_NS when num_


From: Richard Henderson
Subject: [Qemu-devel] [PATCH 1/2] target/arm: Always return ARMASIdx_NS when num_ases == 1
Date: Fri, 29 Jun 2018 17:02:41 -0700

Signed-off-by: Richard Henderson <address@hidden>
---
 target/arm/cpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index e310ffc29d..c26cc43ea8 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2915,7 +2915,7 @@ enum {
 /* Return the address space index to use for a memory access */
 static inline int arm_asidx_from_attrs(CPUState *cs, MemTxAttrs attrs)
 {
-    return attrs.secure ? ARMASIdx_S : ARMASIdx_NS;
+    return cs->num_ases > 1 && attrs.secure ? ARMASIdx_S : ARMASIdx_NS;
 }
 
 /* Return the AddressSpace to use for a memory access
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]