aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/helper_regs.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-03-23 12:43:36 -0600
committerDavid Gibson <david@gibson.dropbear.id.au>2021-05-04 11:41:24 +1000
commitf03de3b44b1053c3c82f41a22ae452d1ecfdd8c5 (patch)
treeca441df0a8df28109c38b5d90e38fcefc3917348 /target/ppc/helper_regs.c
parentf43520e5b233828bd4d98b4a1300ddb475e7486a (diff)
downloadqemu-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/helper_regs.c')
-rw-r--r--target/ppc/helper_regs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
index e345966..f85bb14 100644
--- a/target/ppc/helper_regs.c
+++ b/target/ppc/helper_regs.c
@@ -149,6 +149,9 @@ void hreg_compute_hflags(CPUPPCState *env)
if ((ppc_flags & POWERPC_FLAG_TM) && (msr & (1ull << MSR_TM))) {
hflags |= 1 << HFLAGS_TM;
}
+ if (env->spr[SPR_LPCR] & LPCR_GTSE) {
+ hflags |= 1 << HFLAGS_GTSE;
+ }
#ifndef CONFIG_USER_ONLY
if (!env->has_hv_mode || (msr & (1ull << MSR_HV))) {