From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51392 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3wNw-0005we-O8 for qemu-devel@nongnu.org; Thu, 07 Oct 2010 15:44:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3wNv-0006le-JV for qemu-devel@nongnu.org; Thu, 07 Oct 2010 15:44:12 -0400 Received: from mail-ew0-f45.google.com ([209.85.215.45]:49386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3wNv-0006lW-Dy for qemu-devel@nongnu.org; Thu, 07 Oct 2010 15:44:11 -0400 Received: by ewy26 with SMTP id 26so114773ewy.4 for ; Thu, 07 Oct 2010 12:44:10 -0700 (PDT) Date: Thu, 7 Oct 2010 21:44:07 +0200 From: "Edgar E. Iglesias" Subject: Re: [Qemu-devel] [PATCH 07/11] cris: avoid write only variables Message-ID: <20101007194407.GF16104@laped.lan> References: <20101007110713.GE16104@laped.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Markus Armbruster , qemu-devel On Thu, Oct 07, 2010 at 05:57:30PM +0000, Blue Swirl wrote: > On Thu, Oct 7, 2010 at 11:07 AM, Edgar E. Iglesias > wrote: > > On Thu, Oct 07, 2010 at 12:08:05PM +0200, Markus Armbruster wrote: > >> Blue Swirl writes: > >> > >> > Compiling with GCC 4.6.0 20100925 produced warnings: [...] > > Markus, I agree that removing tlb_v would have been better than ifdefs, > > but i think that the intent I originally had in mind was that there should > > not be a need to flush the entry from the QEMU TLB if the old guest > > entry was not valid. > > > > > > The following patch works on my side: > > > > diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c > > index a60da94..be9eb06 100644 > > --- a/target-cris/op_helper.c > > +++ b/target-cris/op_helper.c > > @@ -164,7 +164,9 @@ void helper_movl_sreg_reg (uint32_t sreg, uint32_t reg) > > > >                        D_LOG("tlb flush vaddr=%x v=%d pc=%x\n", > >                                  vaddr, tlb_v, env->pc); > > -                       tlb_flush_page(env, vaddr); > > +                       if (tlb_v) { > > +                               tlb_flush_page(env, vaddr); > > +                       } > >                } > >        } > >  #endif > > > > > > The target-cris/translate_v10.c hunk looks good. > > > > Blue, can you incorporate the tlb_v change in your patch set? > > Or if you prefer, I can commit that part on my side. > > Please do. OK, done. Thanks