From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWM5B-0005qu-9o for qemu-devel@nongnu.org; Mon, 21 May 2012 02:27:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWM59-0003g9-Mp for qemu-devel@nongnu.org; Mon, 21 May 2012 02:27:04 -0400 Received: from gate.crashing.org ([63.228.1.57]:34867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWM59-0003fz-De for qemu-devel@nongnu.org; Mon, 21 May 2012 02:27:03 -0400 Message-ID: <1337581611.2779.2.camel@pasglop> From: Benjamin Herrenschmidt Date: Mon, 21 May 2012 16:26:51 +1000 In-Reply-To: <31BB839A-D102-497A-AA5B-39E41A039F14@suse.de> References: <1337054780.6727.60.camel@pasglop> <1337565668.2458.14.camel@pasglop> <31BB839A-D102-497A-AA5B-39E41A039F14@suse.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Subject: Re: [Qemu-devel] ppc: CPU reset must flush translation buffer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Peter Maydell , "qemu-devel@nongnu.org" , Andreas =?ISO-8859-1?Q?F=E4rber?= On Mon, 2012-05-21 at 08:16 +0200, Alexander Graf wrote: > > On 21.05.2012, at 04:01, Benjamin Herrenschmidt > wrote: > > > Without that, reset from SLOF crashes in full emulation. > > > > Reported-by: Thomas Huth > > Signed-off-by: Benjamin Herrenschmidt > > --- > > target-ppc/translate_init.c | 1 + > > 1 files changed, 1 insertions(+), 0 deletions(-) > > > > diff --git a/target-ppc/translate_init.c > b/target-ppc/translate_init.c > > index ae03065..fbf7705 100644 > > --- a/target-ppc/translate_init.c > > +++ b/target-ppc/translate_init.c > > @@ -10285,6 +10285,7 @@ static void ppc_cpu_reset(CPUState *s) > > env->error_code = 0; > > /* Flush all TLBs */ > > tlb_flush(env, 1); > > + tb_flush(env); > > Shouldn't this be true for all CPUs? I remember talking about reset > with Peter a while ago... but don't remember the conclusions :) Possibly. I noticed other targets do that too (ARM iirc), in this case I think it's the ROM being reloaded that doesn't flush the cached translations for the vectors (I -think-, that's from memory). But there could be all sort of other context changes, so it seems like the safest thing to do. Cheers, Ben.