diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-03-23 12:43:36 -0600 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-05-04 11:41:24 +1000 |
commit | f03de3b44b1053c3c82f41a22ae452d1ecfdd8c5 (patch) | |
tree | ca441df0a8df28109c38b5d90e38fcefc3917348 /target/ppc/translate.c | |
parent | f43520e5b233828bd4d98b4a1300ddb475e7486a (diff) | |
download | qemu-f03de3b44b1053c3c82f41a22ae452d1ecfdd8c5.zip qemu-f03de3b44b1053c3c82f41a22ae452d1ecfdd8c5.tar.gz qemu-f03de3b44b1053c3c82f41a22ae452d1ecfdd8c5.tar.bz2 |
target/ppc: Put LPCR[GTSE] in hflags
Because this bit was not in hflags, the privilege check
for tlb instructions was essentially random.
Recompute hflags when storing to LPCR.
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210323184340.619757-7-richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/translate.c')
-rw-r--r-- | target/ppc/translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c index d48c554..5e62929 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7908,7 +7908,7 @@ static void ppc_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) ctx->altivec_enabled = (hflags >> HFLAGS_VR) & 1; ctx->vsx_enabled = (hflags >> HFLAGS_VSX) & 1; ctx->tm_enabled = (hflags >> HFLAGS_TM) & 1; - ctx->gtse = !!(env->spr[SPR_LPCR] & LPCR_GTSE); + ctx->gtse = (hflags >> HFLAGS_GTSE) & 1; ctx->singlestep_enabled = 0; if ((hflags >> HFLAGS_SE) & 1) { |