diff options
author | Artyom Tarasenko <atar4qemu@gmail.com> | 2016-03-02 14:53:38 +0100 |
---|---|---|
committer | Artyom Tarasenko <atar4qemu@gmail.com> | 2017-01-18 22:03:44 +0100 |
commit | 9a10756d1204c3528e47892195349bf882069846 (patch) | |
tree | bb6b3067a56f7faffe2fd5d23a0a4f4d2504d0dd /target/sparc/translate.c | |
parent | b8e31b3cc6315bc5c6ec686c363c088c4fb1d0ea (diff) |
target-sparc: hypervisor mode takes over nucleus mode
Accordinf to UA2005, 9.3.3 "Address Space Identifiers",
"In hyperprivileged mode, all instruction fetches and loads and stores with implicit
ASIs use a physical address, regardless of the value of TL".
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Diffstat (limited to 'target/sparc/translate.c')
-rw-r--r-- | target/sparc/translate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 8902e44ca2..009ea3ac92 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2142,7 +2142,11 @@ static DisasASI get_asi(DisasContext *dc, int insn, TCGMemOp memop) case ASI_TWINX_NL: case ASI_NUCLEUS_QUAD_LDD: case ASI_NUCLEUS_QUAD_LDD_L: - mem_idx = MMU_NUCLEUS_IDX; + if (hypervisor(dc)) { + mem_idx = MMU_HYPV_IDX; + } else { + mem_idx = MMU_NUCLEUS_IDX; + } break; case ASI_AIUP: /* As if user primary */ case ASI_AIUPL: /* As if user primary LE */ |