Commit bf14b1cef1835d176d7c247eb8094e14375b24ab

Authored by blueswir1
1 parent 5b5aba4f

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.

Signed-off-by: Alexander Graf <alex@csgraf.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6749 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 14 additions and 0 deletions
target-ppc/translate.c
@@ -4394,6 +4394,20 @@ GEN_HANDLER(tlbia, 0x1F, 0x12, 0x0B, 0x03FFFC01, PPC_MEM_TLBIA) @@ -4394,6 +4394,20 @@ GEN_HANDLER(tlbia, 0x1F, 0x12, 0x0B, 0x03FFFC01, PPC_MEM_TLBIA)
4394 #endif 4394 #endif
4395 } 4395 }
4396 4396
  4397 +/* tlbiel */
  4398 +GEN_HANDLER(tlbiel, 0x1F, 0x12, 0x08, 0x03FF0001, PPC_MEM_TLBIE)
  4399 +{
  4400 +#if defined(CONFIG_USER_ONLY)
  4401 + gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
  4402 +#else
  4403 + if (unlikely(!ctx->mem_idx)) {
  4404 + gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
  4405 + return;
  4406 + }
  4407 + gen_helper_tlbie(cpu_gpr[rB(ctx->opcode)]);
  4408 +#endif
  4409 +}
  4410 +
4397 /* tlbie */ 4411 /* tlbie */
4398 GEN_HANDLER(tlbie, 0x1F, 0x12, 0x09, 0x03FF0001, PPC_MEM_TLBIE) 4412 GEN_HANDLER(tlbie, 0x1F, 0x12, 0x09, 0x03FF0001, PPC_MEM_TLBIE)
4399 { 4413 {