Improve softmmu TLB utilisation by improving tlb_flush usage on PPC64

Goal

The goal is to invalidate only needed TLB entries with tlbie/tlbiel instructions. Currently, all TLBs are completely invalidated on these instructions.

The expected benefits are better performance and more accurate emulation.

Technical details

For PPC64, current implementation in ppc_tlb_invalidate_one(), in file target/ppc/mmu_helper.c, just sets a flag to flush TLBs. The idea would be to change it to something similar to other PPC models, that invalidate only a virtual address range.

Comments in the function above suggest that a tlb_flush_mask(env, n, mask) function is missing in QEMU, but would be needed to invalidate only an address range.

Additional information

Edited by Alex Bennée