xemu/target-ppc
Benjamin Herrenschmidt cd0c6f4735 ppc: Do some batching of TCG tlb flushes
On ppc64 especially, we flush the tlb on any slbie or tlbie instruction.

However, those instructions often come in bursts of 3 or more (context
switch will favor a series of slbie's for example to an slbia if the
SLB has less than a certain number of entries in it, and tlbie's can
happen in a series, with PAPR, H_BULK_REMOVE can remove up to 4 entries
at a time.

Doing a tlb_flush() each time is a waste of time. We end up doing a memset
of the whole TLB, reloading it for the next instruction, memset'ing again,
etc...

Those instructions don't have to take effect immediately. For slbie, they
can wait for the next context synchronizing event. For tlbie, the next
tlbsync.

This implements batching by keeping a flag that indicates that we have a
TLB in need of flushing. We check it on interrupts, rfi's, isync's and
tlbsync and flush the TLB if needed.

This reduces the number of tlb_flush() on a boot to a ubuntu installer
first dialog screen from roughly 360K down to 36K.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[clg: added a 'CPUPPCState *' variable in h_remove() and
      h_bulk_remove() ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
[dwg: removed spurious whitespace change, use 0/1 not true/false
      consistently, since tlb_need_flush has int type]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-05-30 13:20:04 +10:00
..
Makefile.objs kvm_ppc: remove kvmppc_timer_hack 2015-09-20 22:48:38 +02:00
STATUS target-ppc: remove powerpc 970gx 2014-03-05 03:06:23 +01:00
arch_dump.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
cpu-models.c target-ppc: Add PVR for POWER8NVL processor 2016-03-16 09:55:05 +11:00
cpu-models.h target-ppc: Add PVR for POWER8NVL processor 2016-03-16 09:55:05 +11:00
cpu-qom.h target-ppc: make cpu-qom.h not target specific 2016-05-19 16:41:33 +02:00
cpu.h ppc: Do some batching of TCG tlb flushes 2016-05-30 13:20:04 +10:00
dfp_helper.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
excp_helper.c ppc: Do some batching of TCG tlb flushes 2016-05-30 13:20:04 +10:00
fpu_helper.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
gdbstub.c qemu-common: push cpu.h inclusion out of qemu-common.h 2016-05-19 16:42:29 +02:00
helper.h ppc: Do some batching of TCG tlb flushes 2016-05-30 13:20:04 +10:00
helper_regs.h ppc: Do some batching of TCG tlb flushes 2016-05-30 13:20:04 +10:00
int_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
kvm-stub.c qemu-common: push cpu.h inclusion out of qemu-common.h 2016-05-19 16:42:29 +02:00
kvm.c qemu-common: push cpu.h inclusion out of qemu-common.h 2016-05-19 16:42:29 +02:00
kvm_ppc.h spapr_iommu: Finish renaming vfio_accel to need_vfio 2016-05-27 09:40:23 +10:00
machine.c ppc: Use split I/D mmu modes to avoid flushes on interrupts 2016-05-30 13:20:04 +10:00
mem_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
mfrom_table.c
mfrom_table_gen.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
misc_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
mmu-hash32.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
mmu-hash32.h target-ppc: do not use target_ulong in cpu-qom.h 2016-05-19 13:08:05 +02:00
mmu-hash64.c ppc: Do some batching of TCG tlb flushes 2016-05-30 13:20:04 +10:00
mmu-hash64.h target-ppc: do not use target_ulong in cpu-qom.h 2016-05-19 13:08:05 +02:00
mmu_helper.c ppc: Do some batching of TCG tlb flushes 2016-05-30 13:20:04 +10:00
monitor.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
timebase_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
translate.c ppc: Do some batching of TCG tlb flushes 2016-05-30 13:20:04 +10:00
translate_init.c PPC/KVM: early validation of vcpu id 2016-05-27 09:40:23 +10:00
user_only_helper.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00