[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 9/9] target/ppc: fix tlbsync to check privilege level d
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 9/9] target/ppc: fix tlbsync to check privilege level depending on GTSE |
Date: |
Thu, 15 Mar 2018 15:19:03 +1100 |
From: Cédric Le Goater <address@hidden>
tlbsync also needs to check the Guest Translation Shootdown Enable
(GTSE) bit in the Logical Partition Control Register (LPCR) to
determine at which privilege level it is running.
See commit c6fd28fd573d ("target/ppc: Update tlbie to check privilege
level based on GTSE")
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: Suraj Jitindar Singh <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/translate.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 0a0c090c99..218665b408 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -4526,7 +4526,7 @@ static void gen_tlbie(DisasContext *ctx)
TCGv_i32 t1;
if (ctx->gtse) {
- CHK_SV; /* If gtse is set then tblie is supervisor privileged */
+ CHK_SV; /* If gtse is set then tlbie is supervisor privileged */
} else {
CHK_HV; /* Else hypervisor privileged */
}
@@ -4553,7 +4553,12 @@ static void gen_tlbsync(DisasContext *ctx)
#if defined(CONFIG_USER_ONLY)
GEN_PRIV;
#else
- CHK_HV;
+
+ if (ctx->gtse) {
+ CHK_SV; /* If gtse is set then tlbsync is supervisor privileged */
+ } else {
+ CHK_HV; /* Else hypervisor privileged */
+ }
/* BookS does both ptesync and tlbsync make tlbsync a nop for server */
if (ctx->insns_flags & PPC_BOOKE) {
--
2.14.3
- [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 2/9] tests/boot-serial: Check the 40p machine, too, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 3/9] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 4/9] hw/misc/macio: Mark the macio devices with user_creatable = false, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 1/9] sii3112: Remove unneeded exit function, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 8/9] tests/boot-serial: Test the sam460ex board, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 6/9] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth", David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 5/9] PPC e500: Fix gap between u-boot and kernel, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 9/9] target/ppc: fix tlbsync to check privilege level depending on GTSE,
David Gibson <=
- [Qemu-ppc] [PULL 7/9] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...), David Gibson, 2018/03/15
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, Peter Maydell, 2018/03/16
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, David Gibson, 2018/03/17
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, Peter Maydell, 2018/03/17
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, BALATON Zoltan, 2018/03/17
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, BALATON Zoltan, 2018/03/17
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, David Gibson, 2018/03/18
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, Thomas Huth, 2018/03/19
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, David Gibson, 2018/03/18