On 7 August 2015 at 13:33, Peter Maydell <peter.mayd...@linaro.org> wrote: > Guest CPU TLB maintenance operations may be sufficiently > specialized to only need to flush TLB entries corresponding > to a particular MMU index. Implement cputlb functions for > this, to avoid the inefficiency of flushing TLB entries > which we don't need to. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > cputlb.c | 81 > +++++++++++++++++++++++++++++++++++++++++++++++++ > include/exec/exec-all.h | 47 ++++++++++++++++++++++++++++ > 2 files changed, 128 insertions(+) > > diff --git a/cputlb.c b/cputlb.c > index a506086..a1996ba 100644 > --- a/cputlb.c > +++ b/cputlb.c > @@ -69,6 +69,39 @@ void tlb_flush(CPUState *cpu, int flush_global) > tlb_flush_count++; > } > > +static inline void v_tlb_flush_by_mmuidx(CPUState *cpu, va_list argp) > +{ > + CPUArchState *env = cpu->env_ptr; > + > +#if defined(DEBUG_TLB) > + printf("tlb_flush_by_mmuidx %d:\n", mmu_idx); > +#endif
This debug tracing doesn't compile if enabled -- it was written to go with my initial implementation which took a single mmu_idx rather than varargs, and I forgot to update it. I'll send out a v2 shortly. thanks -- PMM