Skip to contentSkip to conversation

[6749] Implment tlbiel

Qemu-devel Blue Swirl 1 participant 1 message Mar 7, 2009

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 6749

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6749
Author:   blueswir1
Date:     2009-03-07 20:52:22 +0000 (Sat, 07 Mar 2009)

Log Message:
-----------
Implment tlbiel

Linux uses tlbiel to flush TLB entries in PPC64 mode. This special TLB flush opcode only flushes an entry for the CPU it runs on, not across all CPUs in the system.

Modified Paths:
--------------
trunk/target-ppc/translate.c

Modified: trunk/target-ppc/translate.c
===================================================================

target-ppc/translate.c +14 -0
@@ -4394,6 +4394,20 @@
 #endif
 }
 
+/* tlbiel */
+GEN_HANDLER(tlbiel, 0x1F, 0x12, 0x08, 0x03FF0001, PPC_MEM_TLBIE)
+{
+#if defined(CONFIG_USER_ONLY)
+    gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
+#else
+    if (unlikely(!ctx->mem_idx)) {
+        gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
+        return;
+    }
+    gen_helper_tlbie(cpu_gpr[rB(ctx->opcode)]);
+#endif
+}
+
 /* tlbie */
 GEN_HANDLER(tlbie, 0x1F, 0x12, 0x09, 0x03FF0001, PPC_MEM_TLBIE)
 {