From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUIci-0004Jb-TD for qemu-devel@nongnu.org; Tue, 25 Aug 2015 14:07:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUIcd-0007C2-T8 for qemu-devel@nongnu.org; Tue, 25 Aug 2015 14:07:04 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUIcd-0007By-KK for qemu-devel@nongnu.org; Tue, 25 Aug 2015 14:06:59 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 19FB221497 for ; Tue, 25 Aug 2015 14:06:59 -0400 (EDT) Date: Tue, 25 Aug 2015 14:07:22 -0400 From: "Emilio G. Cota" Message-ID: <20150825180722.GA23135@flamenco> References: <55DA6D53.2080709@redhat.com> <1440463270-11819-1-git-send-email-cota@braap.org> <1440463270-11819-4-git-send-email-cota@braap.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1440463270-11819-4-git-send-email-cota@braap.org> Subject: Re: [Qemu-devel] [PATCH 4/4] bsd-user: add helper to set current_cpu before cpu_loop() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: pbonzini@redhat.com Cc: mttcg@listserver.greensocs.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, guillaume.delbergue@greensocs.com, alex.bennee@linaro.org, Frederic Konrad On Mon, Aug 24, 2015 at 20:41:10 -0400, Emilio G. Cota wrote: > Note: cannot compile bsd-user here (linux), please compile-test. > > Signed-off-by: Emilio G. Cota > --- (snip) > diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h > index 5902614..751efd5 100644 > --- a/bsd-user/qemu.h > +++ b/bsd-user/qemu.h > @@ -163,6 +163,12 @@ int get_osversion(void); > void fork_start(void); > void fork_end(int child); > > +static inline void do_cpu_loop(CPUArchState *env) > +{ Here we should also call rcu_register_thread(). > + current_cpu = ENV_GET_CPU(env); > + cpu_loop(env); > +} Emilio