From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsiz1-0006Zw-ND for qemu-devel@nongnu.org; Mon, 16 Dec 2013 19:58:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vsiyv-0005i4-TU for qemu-devel@nongnu.org; Mon, 16 Dec 2013 19:57:59 -0500 Received: from mail-pb0-x231.google.com ([2607:f8b0:400e:c01::231]:39582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsiyv-0005i0-MH for qemu-devel@nongnu.org; Mon, 16 Dec 2013 19:57:53 -0500 Received: by mail-pb0-f49.google.com with SMTP id jt11so6205169pbb.22 for ; Mon, 16 Dec 2013 16:57:52 -0800 (PST) Date: Tue, 17 Dec 2013 10:57:19 +1000 From: "Edgar E. Iglesias" Message-ID: <20131217005719.GG2161@edvb> References: <1387181170-23267-1-git-send-email-edgar.iglesias@gmail.com> <1387181170-23267-11-git-send-email-edgar.iglesias@gmail.com> <52AEF7F3.2020504@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52AEF7F3.2020504@suse.de> Subject: Re: [Qemu-devel] [PATCH v1 10/22] exec: On AS changes, only flush affected CPU TLBs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, blauwirbel@gmail.com, aliguori@amazon.com, pcrost@xilinx.com, pbonzini@redhat.com, aurelien@aurel32.net, rth@twiddle.net On Mon, Dec 16, 2013 at 01:54:11PM +0100, Andreas Färber wrote: > Am 16.12.2013 09:05, schrieb edgar.iglesias@gmail.com: > > From: "Edgar E. Iglesias" > > > > Signed-off-by: Edgar E. Iglesias > > --- > > exec.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/exec.c b/exec.c > > index edb6a43..203c8e4 100644 > > --- a/exec.c > > +++ b/exec.c > > @@ -1810,6 +1810,11 @@ static void tcg_commit(MemoryListener *listener) > > reset the modified entries */ > > /* XXX: slow ! */ > > CPU_FOREACH(cpu) { > > + /* FIXME: Disentangle the cpu.h circular files deps so we can > > + directly get the right CPU from listener. */ > > Was this circular dependency explained somewhere? Not really, I dont remember the exact details of which files it involves but basically MemoryListeners storage size is not known at the time CPUState is declared. I've got a patch that fixes it but it involves changing lots of files so I opted to leave it out if the first round as this patch already is fairly intrusive... Ill post that change later as a follow-up. > > > + if (cpu->tcg_as_listener != listener) { > > + continue; > > + } > > If this is to be committed (rather than fixed in a v2), please move to > below variables as usual. Fixed, thanks. > > Regards, > Andreas > > > CPUArchState *env = cpu->env_ptr; > > > > tlb_flush(env, 1); > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg