From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSkm8-0002TR-H5 for qemu-devel@nongnu.org; Tue, 03 Mar 2015 06:14:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSkm5-0002m6-OZ for qemu-devel@nongnu.org; Tue, 03 Mar 2015 06:14:08 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:34132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSkm5-0002lu-Fi for qemu-devel@nongnu.org; Tue, 03 Mar 2015 06:14:05 -0500 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Mar 2015 11:14:04 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 01FBE219004D for ; Tue, 3 Mar 2015 11:13:53 +0000 (GMT) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t23BE0OZ7995766 for ; Tue, 3 Mar 2015 11:14:00 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t23BE0gl011222 for ; Tue, 3 Mar 2015 04:14:00 -0700 Message-ID: <54F59777.7020008@de.ibm.com> Date: Tue, 03 Mar 2015 12:13:59 +0100 From: Christian Borntraeger MIME-Version: 1.0 References: <1425378969-9677-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1425378969-9677-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vl: take iothread lock very early List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Am 03.03.2015 um 11:36 schrieb Paolo Bonzini: > If the iothread lock isn't taken by the main thread, the RCU callbacks > might run concurrently with the main thread. QEMU's not ready for that. > > Signed-off-by: Paolo Bonzini Tested-by: Christian Borntraeger > --- > vl.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/vl.c b/vl.c > index 09693f5..d743727 100644 > --- a/vl.c > +++ b/vl.c > @@ -2763,6 +2763,9 @@ int main(int argc, char **argv, char **envp) > FILE *vmstate_dump_file = NULL; > Error *main_loop_err = NULL; > > + qemu_init_cpu_loop(); > + qemu_mutex_lock_iothread(); > + > atexit(qemu_run_exit_notifiers); > error_set_progname(argv[0]); > qemu_init_exec_dir(argv[0]); > @@ -4098,9 +4101,6 @@ int main(int argc, char **argv, char **envp) > > os_set_line_buffering(); > > - qemu_init_cpu_loop(); > - qemu_mutex_lock_iothread(); > - > #ifdef CONFIG_SPICE > /* spice needs the timers to be initialized by this point */ > qemu_spice_init(); >