OSDN Git Service

target-ppc: add flag in check_tlb_flush()
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Tue, 20 Sep 2016 16:35:00 +0000 (22:05 +0530)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 23 Sep 2016 02:39:07 +0000 (12:39 +1000)
commite3cffe6fad29e07d401eabb913a6d88501d5c143
tree1b4549c07f120cefc56dd0d420575cdef486e7d1
parenta8a6d53e3626e96d5a37b9eb6dc6ce759714502e
target-ppc: add flag in check_tlb_flush()

We flush the qemu TLB lazily. check_tlb_flush is called whenever we hit
a context synchronizing event or instruction that requires a pending
flush to be performed.

However, we fail to handle broadcast TLB flush operations. In order to
fix that efficiently, we want to differentiate whether check_tlb_flush()
needs to only apply pending local flushes (isync instructions,
interrupts, ...) or also global pending flush operations. The latter is
only needed when executing instructions that are defined architecturally
as synchronizing global TLB flush operations. This in our case is
ptesync on BookS and tlbsync on BookE along with the paravirtualized
hypervisor calls.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
[dwg: Changed gen_check_tlb_flush() to also take a bool, and fixed
 some spelling errors in commit message]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_hcall.c
target-ppc/excp_helper.c
target-ppc/helper.h
target-ppc/helper_regs.h
target-ppc/mmu_helper.c
target-ppc/translate.c