]> Git Repo - qemu.git/commitdiff
target-sparc: use direct address translation in hyperprivileged mode
authorArtyom Tarasenko <[email protected]>
Thu, 9 Jun 2016 08:16:03 +0000 (10:16 +0200)
committerArtyom Tarasenko <[email protected]>
Wed, 18 Jan 2017 21:03:44 +0000 (22:03 +0100)
Please note that QEMU doesn't impelement Real->Physical address
translation. The "Real Address" is always the "Physical Address".

Suggested-by: Richard Henderson <[email protected]>
Signed-off-by: Artyom Tarasenko <[email protected]>
target/sparc/cpu.h
target/sparc/translate.c

index 857e93b12ed3e5cb55469d91381505aa79c9f747..53afa18d6e4a99b6b577f08c352ac2b43ffb5875 100644 (file)
@@ -230,7 +230,7 @@ enum {
 #if !defined(TARGET_SPARC64)
 #define NB_MMU_MODES 3
 #else
-#define NB_MMU_MODES 7
+#define NB_MMU_MODES 6
 typedef struct trap_state {
     uint64_t tpc;
     uint64_t tnpc;
@@ -676,8 +676,7 @@ int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc);
 #define MMU_KERNEL_IDX 2
 #define MMU_KERNEL_SECONDARY_IDX 3
 #define MMU_NUCLEUS_IDX 4
-#define MMU_HYPV_IDX   5
-#define MMU_PHYS_IDX   6
+#define MMU_PHYS_IDX   5
 #else
 #define MMU_USER_IDX   0
 #define MMU_KERNEL_IDX 1
@@ -723,7 +722,7 @@ static inline int cpu_mmu_index(CPUSPARCState *env, bool ifetch)
         : (env->lsu & DMMU_E) == 0) {
         return MMU_PHYS_IDX;
     } else if (cpu_hypervisor_mode(env)) {
-        return MMU_HYPV_IDX;
+        return MMU_PHYS_IDX;
     } else if (env->tl > 0) {
         return MMU_NUCLEUS_IDX;
     } else if (cpu_supervisor_mode(env)) {
index 109997684a78aabe41cec47bec6b5645d71862bb..0f20ed0511ab457a7cc4140238154c902e06ba03 100644 (file)
@@ -2143,7 +2143,7 @@ static DisasASI get_asi(DisasContext *dc, int insn, TCGMemOp memop)
         case ASI_NUCLEUS_QUAD_LDD:
         case ASI_NUCLEUS_QUAD_LDD_L:
             if (hypervisor(dc)) {
-                mem_idx = MMU_HYPV_IDX;
+                mem_idx = MMU_PHYS_IDX;
             } else {
                 mem_idx = MMU_NUCLEUS_IDX;
             }
This page took 0.035947 seconds and 4 git commands to generate.