qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Pranith Kumar <bobby.prani@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] mttcg: Handle EXCP_ATOMIC exception
Date: Wed, 02 Nov 2016 18:17:21 +0000	[thread overview]
Message-ID: <871sytvj9q.fsf@linaro.org> (raw)
In-Reply-To: <639cd027-f6db-d66d-c664-d5430831cddf@redhat.com>


Paolo Bonzini <pbonzini@redhat.com> writes:

> On 02/11/2016 17:40, Pranith Kumar wrote:
>> The patch enables handling atomic code in the guest. This should be
>> preferably done in cpu_handle_exception(), but the current assumptions
>> regarding when we can execute atomic sections cause a deadlock.
>>
>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>> ---
>>  cpus.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/cpus.c b/cpus.c
>> index 8f98060..299ce7e 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -1315,6 +1315,11 @@ static void *qemu_tcg_rr_cpu_thread_fn(void *arg)
>>                  if (r == EXCP_DEBUG) {
>>                      cpu_handle_guest_debug(cpu);
>>                      break;
>> +                } else if (r == EXCP_ATOMIC) {
>> +                    qemu_mutex_unlock_iothread();
>> +                    cpu_exec_step_atomic(cpu);
>> +                    qemu_mutex_lock_iothread();
>> +                    break;
>>                  }
>>              } else if (cpu->stop) {
>>                  if (cpu->unplug) {
>> @@ -1385,6 +1390,10 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
>>                   */
>>                  g_assert(cpu->halted);
>>                  break;
>> +            case EXCP_ATOMIC:
>> +                qemu_mutex_unlock_iothread();
>> +                cpu_exec_step_atomic(cpu);
>> +                qemu_mutex_lock_iothread();
>>              default:
>>                  /* Ignore everything else? */
>>                  break;
>>
>
> Alex, please pick up this patch yourself.

Yep, I'll apply it to my tree.
>
> Paolo


--
Alex Bennée

      reply	other threads:[~2016-11-02 18:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 14:25 [Qemu-devel] [PATCH] mttcg: Handle EXCP_ATOMIC exception Pranith Kumar
2016-11-02 16:22 ` Alex Bennée
2016-11-02 16:30   ` Pranith Kumar
2016-11-02 16:40 ` [Qemu-devel] [PATCH v2] " Pranith Kumar
2016-11-02 16:49   ` Paolo Bonzini
2016-11-02 18:17     ` Alex Bennée [this message]

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=871sytvj9q.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=bobby.prani@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).