From: Pranith Kumar <bobby.prani@gmail.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH] mttcg: Handle EXCP_ATOMIC exception
Date: Wed, 02 Nov 2016 12:30:20 -0400 [thread overview]
Message-ID: <87r36tzvxf.fsf@gmail.com> (raw)
In-Reply-To: <8737j9vokj.fsf@linaro.org>
Alex Bennée writes:
> Pranith Kumar <bobby.prani@gmail.com> writes:
>
>> 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 | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/cpus.c b/cpus.c
>> index 8f98060..c4ba7d8 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -1315,6 +1315,9 @@ 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) {
>> + cpu_exec_step_atomic(cpu);
>> + break;
>
> Hmm don't we need to unlock the iothread here as well? I suspect you
> never see a deadlock because the rr thread can't by definition race with
> itself but the locking practice should be the same for both cases.
>
Yes, not having any other thread to race with is the reason I did not unlock
the iothread. But, I agree that the semantics need to be the same.
I will send an updated patch.
Thanks,
--
Pranith
next prev parent reply other threads:[~2016-11-02 16:30 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 [this message]
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
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=87r36tzvxf.fsf@gmail.com \
--to=bobby.prani@gmail.com \
--cc=alex.bennee@linaro.org \
--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.