All of lore.kernel.org
 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>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Richard Henderson <rth@twiddle.net>,
	"open list:Overall" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] tcg: handle EXCP_ATOMIC exception properly
Date: Fri, 10 Feb 2017 12:57:07 +0000	[thread overview]
Message-ID: <87wpcyw6e4.fsf@linaro.org> (raw)
In-Reply-To: <239d2e0e-2087-9135-8946-797d006968f9@redhat.com>


Paolo Bonzini <pbonzini@redhat.com> writes:

> On 10/02/2017 13:18, Alex Bennée wrote:
>>> I think you can unlock/lock the iothread here, and also call
>>
>> The iothread is already unlocked by this point (see tcg_cpu_exec).
>
> Is this patch on top of the MTTCG branch?  If not, cpu_handle_exception
> runs with the iothread lock taken doesn't it?
>
>>> cpu_exec_end/start to work around the limitation in start_exclusive.
>>
>> While that seems right it also seems very messy as it inverts the calls
>> so far. I fear we may end up very confused in special casing. Is there a
>> cleaner way we can unwind this?
>
> I'm not sure what is messy...  cpu_exec_start/end and
> start/end_exclusive are fundamentally a rwlock.
>
> Doing
>
> 	cpu_exec_end
> 	start_exclusive
> 	...
> 	end_exclusive
> 	cpu_exec_start
>
> simply means temporarily upgrading the lock from read to write.

I mean messy from the point of reading the code where we reverse a
sequence done from higher up in the call chain. Maybe I'm being overly
picky because we aren't exactly on a hot path here anyway.

--
Alex Bennée

  reply	other threads:[~2017-02-10 12:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10  1:45 [Qemu-devel] [PATCH] tcg: handle EXCP_ATOMIC exception properly Pranith Kumar
2017-02-10  4:54 ` Pranith Kumar
2017-02-10 11:34 ` Paolo Bonzini
2017-02-10 12:18   ` Alex Bennée
2017-02-10 12:29     ` Paolo Bonzini
2017-02-10 12:57       ` Alex Bennée [this message]
2017-02-10 13:59       ` Pranith Kumar
2017-02-10 12:13 ` Alex Bennée
2017-02-10 12:15   ` Paolo Bonzini
2017-02-10 12:33     ` Alex Bennée
2017-02-10 13:12       ` Paolo Bonzini
2017-02-10 14:37         ` Alex Bennée
2017-02-10 14:44           ` Paolo Bonzini

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=87wpcyw6e4.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=bobby.prani@gmail.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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.