aboutsummaryrefslogtreecommitdiff
path: root/target/sparc/win_helper.c
diff options
context:
space:
mode:
authorArtyom Tarasenko <atar4qemu@gmail.com>2016-06-07 18:33:53 +0200
committerArtyom Tarasenko <atar4qemu@gmail.com>2017-01-18 22:03:44 +0100
commit6e040755f12eba34d2fa3d56b18de32d63fea631 (patch)
treee408d895b8312b5ef2f81a8f55513d9078383d91 /target/sparc/win_helper.c
parent9a10756d1204c3528e47892195349bf882069846 (diff)
target-sparc: implement UA2005 hypervisor traps
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Diffstat (limited to 'target/sparc/win_helper.c')
-rw-r--r--target/sparc/win_helper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c
index 2d5b5469a9..45ee4e643e 100644
--- a/target/sparc/win_helper.c
+++ b/target/sparc/win_helper.c
@@ -366,6 +366,9 @@ void helper_done(CPUSPARCState *env)
env->asi = (tsptr->tstate >> 24) & 0xff;
cpu_change_pstate(env, (tsptr->tstate >> 8) & 0xf3f);
cpu_put_cwp64(env, tsptr->tstate & 0xff);
+ if (cpu_has_hypervisor(env)) {
+ env->hpstate = env->htstate[env->tl];
+ }
env->tl--;
trace_win_helper_done(env->tl);
@@ -387,6 +390,9 @@ void helper_retry(CPUSPARCState *env)
env->asi = (tsptr->tstate >> 24) & 0xff;
cpu_change_pstate(env, (tsptr->tstate >> 8) & 0xf3f);
cpu_put_cwp64(env, tsptr->tstate & 0xff);
+ if (cpu_has_hypervisor(env)) {
+ env->hpstate = env->htstate[env->tl];
+ }
env->tl--;
trace_win_helper_retry(env->tl);