提交 91c60f12 编写于 作者: C Cédric Le Goater 提交者: David Gibson

target/ppc: fix tlbsync to check privilege level depending on GTSE

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 c6fd28fd ("target/ppc: Update tlbie to check privilege
level based on GTSE")
Signed-off-by: NCédric Le Goater <clg@kaod.org>
Reviewed-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
上级 21a5a442
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册