qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 09/29] target-sparc: hypervisor mode takes over


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 09/29] target-sparc: hypervisor mode takes over nucleus mode
Date: Mon, 10 Oct 2016 16:41:32 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 10/01/2016 05:05 AM, Artyom Tarasenko wrote:
Signed-off-by: Artyom Tarasenko <address@hidden>
---
 target-sparc/cpu.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 0b5c79f..fbeb8d7 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -699,10 +699,10 @@ static inline int cpu_mmu_index(CPUSPARCState *env1, bool 
ifetch)
 #elif !defined(TARGET_SPARC64)
     return env1->psrs;
 #else
-    if (env1->tl > 0) {
-        return MMU_NUCLEUS_IDX;
-    } else if (cpu_hypervisor_mode(env1)) {
+    if (cpu_hypervisor_mode(env1)) {
         return MMU_HYPV_IDX;
+    } else if (env1->tl > 0) {
+        return MMU_NUCLEUS_IDX;
     } else if (cpu_supervisor_mode(env1)) {
         return MMU_KERNEL_IDX;
     } else {


While playing with your patch set, I discovered that we also need a patch to get_asi for ASI_N et al to retain MMU_HYPV_IDX, and not decrease privilege. This happens *very* early in the prom boot, with the first casx (when casx is implemented inline).


r~



reply via email to

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