From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQCAf-0000EH-9U for qemu-devel@nongnu.org; Fri, 14 Aug 2015 06:25:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQCAb-0004qb-Go for qemu-devel@nongnu.org; Fri, 14 Aug 2015 06:25:09 -0400 Received: from mail-vk0-f49.google.com ([209.85.213.49]:35441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQCAb-0004o5-8s for qemu-devel@nongnu.org; Fri, 14 Aug 2015 06:25:05 -0400 Received: by vkfi73 with SMTP id i73so28310480vkf.2 for ; Fri, 14 Aug 2015 03:25:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1438950810-28618-2-git-send-email-peter.maydell@linaro.org> References: <1438950810-28618-1-git-send-email-peter.maydell@linaro.org> <1438950810-28618-2-git-send-email-peter.maydell@linaro.org> From: Peter Maydell Date: Fri, 14 Aug 2015 11:24:45 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 1/6] cputlb: Add functions for flushing TLB for a single MMU index List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Cc: "Edgar E. Iglesias" , Patch Tracking , =?UTF-8?B?QWxleCBCZW5uw6ll?= , Paolo Bonzini On 7 August 2015 at 13:33, Peter Maydell 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 > --- > 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