public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Julien Grall <julien.grall@arm.com>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	kvmarm@lists.cs.columbia.edu,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	julia@ni.com
Subject: Re: KVM Arm Device passthrough and linux-rt
Date: Tue, 4 Jun 2019 14:53:26 +0100	[thread overview]
Message-ID: <f2fbc06b-373f-ee2a-b111-ea40848dc1c5@arm.com> (raw)
In-Reply-To: <20190604091607.2e87eb36@oasis.local.home>

On 04/06/2019 14:16, Steven Rostedt wrote:
> On Tue, 4 Jun 2019 13:58:51 +0100
> Julien Grall <julien.grall@arm.com> wrote:
> 
>> This is happening because vgic_v2_fold_lr_state() is expected
>> to be called with interrupt disabled. However, some of the path
>> (e.g eventfd) will take a spinlock.
>>
>> The spinlock is from the waitqueue, so using a raw_spin_lock cannot
>> even be considered.
>>
>> Do you have any input on how this could be solved?
> 
> What's the reason that vgic_v2_fold_lr_state() expects interrupts to be
> disabled?

That's to prevent the injection of an interrupt firing on the same CPU
while we're saving the corresponding vcpu interrupt context, among other
things (the whole guest exit path runs with interrupt disabled in order
to avoid this kind of thing).

One possibility would be to accumulate the set of interrupt that require
resampling (which is bound to be small, the number of LRs at most) and
call kvm_notify_acked_irq on that set once interrupts are re-enabled.

I'll have a look...

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2019-06-04 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 12:58 KVM Arm Device passthrough and linux-rt Julien Grall
2019-06-04 13:16 ` Steven Rostedt
2019-06-04 13:53   ` Marc Zyngier [this message]
2019-06-04 14:28     ` Marc Zyngier
2019-06-04 15:04     ` Steven Rostedt
2019-06-04 13:50 ` Sebastian Andrzej Siewior

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=f2fbc06b-373f-ee2a-b111-ea40848dc1c5@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=bigeasy@linutronix.de \
    --cc=julia@ni.com \
    --cc=julien.grall@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.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