qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 15/29] target-sparc: allow priveleged ASIs in hyperp


From: Artyom Tarasenko
Subject: [Qemu-devel] [PATCH 15/29] target-sparc: allow priveleged ASIs in hyperprivileged mode
Date: Sat, 1 Oct 2016 12:05:19 +0200

Signed-off-by: Artyom Tarasenko <address@hidden>
---
 target-sparc/ldst_helper.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c
index 5fb9024..70febcb 100644
--- a/target-sparc/ldst_helper.c
+++ b/target-sparc/ldst_helper.c
@@ -1295,10 +1295,9 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong 
addr,
 
     asi &= 0xff;
 
-    if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0)
-        || (cpu_has_hypervisor(env)
-            && asi >= 0x30 && asi < 0x80
-            && !(env->hpstate & HS_PRIV))) {
+    if (((!cpu_hypervisor_mode(env)) && asi < 0x80)
+        && (((env->pstate & PS_PRIV) == 0)
+        || (cpu_has_hypervisor(env) && asi >= 0x30))) {
         helper_raise_exception(env, TT_PRIV_ACT);
     }
 
@@ -1727,10 +1726,9 @@ void helper_st_asi(CPUSPARCState *env, target_ulong 
addr, target_ulong val,
 
     asi &= 0xff;
 
-    if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0)
-        || (cpu_has_hypervisor(env)
-            && asi >= 0x30 && asi < 0x80
-            && !(env->hpstate & HS_PRIV))) {
+    if (((!cpu_hypervisor_mode(env)) && asi < 0x80)
+        && (((env->pstate & PS_PRIV) == 0)
+        || (cpu_has_hypervisor(env) && asi >= 0x30))) {
         helper_raise_exception(env, TT_PRIV_ACT);
     }
 
-- 
2.7.2




reply via email to

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