All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target/alpha: Take BQL around clock manipulations
Date: Tue, 07 Mar 2017 06:55:07 +0000	[thread overview]
Message-ID: <87fuipinjo.fsf@linaro.org> (raw)
In-Reply-To: <5c02d7b4-6b8d-2fa5-b4f9-ce0e7fddaa73@twiddle.net>


Richard Henderson <rth@twiddle.net> writes:

> On 03/07/2017 08:00 AM, Paolo Bonzini wrote:
>>> Signed-off-by: Richard Henderson <rth@twiddle.net>
>>> ---
>>> This is similar to the patch that I saw go by for MIPS.
>>>
>>> I hadn't noticed any problems caused by this lack of locking.  This may
>>> be because interrupts cannot be delivered while in PALmode while these
>>> registers are being manipulated.  However, it's always better to obey
>>> the rules, right?
>>
>> This should not be necessary, clocks and timers are thread-safe.  Time
>> to make a list of the few things that are, I guess.
>>
>> There are issues if data is accessed by device models and CPU out of
>> the lock, but everything seems fine for typhoon_alarm_timer.
>
> This isn't typhoon_alarm_timer, but the move-to-special-register
> instruction on the cpu side.
>
> But I guess I misunderstood the problem that was happening for MIPS.
> If nothing needs changing for Alpha, that's great.

Fundamentally the MIPS instructions ended up calling into hw/mips/ which
could then end up triggering an IRQ (at which point the BQL assertion
kicks in).

Basically crossing from target/foo/helper to hw/foo/emulation is the
warning sign that you need to ensure you have appropriate device
emulation locking going on.

Helpers just messing with their own env should be able to continue just
fine.

>
>
> r~


--
Alex Bennée

      reply	other threads:[~2017-03-07  6:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 20:56 [Qemu-devel] [PATCH] target/alpha: Take BQL around clock manipulations Richard Henderson
2017-03-06 21:00 ` Paolo Bonzini
2017-03-06 21:09   ` Richard Henderson
2017-03-07  6:55     ` 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=87fuipinjo.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --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.