|
| From: | Richard Henderson |
| Subject: | Re: [Qemu-devel] [PATCH 15/29] target-sparc: allow priveleged ASIs in hyperprivileged mode |
| Date: | Tue, 11 Oct 2016 08:57:11 -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:
@@ -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);
}
You need the same change in get_asi.And perhaps pull out this check as do_check_asi so that we don't need to replicate it. On top of my sparc tree this becomes the following.
r~
0015-target-sparc-allow-priveleged-ASIs-in-hyperprivilege.patch
Description: Text Data
| [Prev in Thread] | Current Thread | [Next in Thread] |