All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vl: take iothread lock very early
Date: Tue, 03 Mar 2015 12:13:59 +0100	[thread overview]
Message-ID: <54F59777.7020008@de.ibm.com> (raw)
In-Reply-To: <1425378969-9677-1-git-send-email-pbonzini@redhat.com>

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 <pbonzini@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>


> ---
>  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();
> 

  reply	other threads:[~2015-03-03 11:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 10:36 [Qemu-devel] [PATCH] vl: take iothread lock very early Paolo Bonzini
2015-03-03 11:13 ` Christian Borntraeger [this message]
2015-03-03 11:29 ` Gonglei
2015-03-03 13:43 ` Peter Maydell
2015-03-03 16:03 ` Oliver Francke
2015-03-03 16:51   ` Paolo Bonzini
2015-03-03 17:19     ` Oliver Francke
2015-03-03 17:32       ` Paolo Bonzini
2015-03-03 18:02         ` Oliver Francke
2015-03-04 22:20         ` Christian Borntraeger
2015-03-05  0:40         ` Eric Blake
2015-03-05 10:07           ` Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F59777.7020008@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.