[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190201173650.GC29111@jcartwri.amer.corp.natinst.com>
Date: Fri, 1 Feb 2019 17:36:51 +0000
From: Julia Cartwright <julia@...com>
To: Julien Grall <julien.grall@....com>
CC: Julien Thierry <julien.thierry@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"linux-rt-users@...r.kernel.org" <linux-rt-users@...r.kernel.org>,
"marc.zyngier@....com" <marc.zyngier@....com>,
"bigeasy@...utronix.de" <bigeasy@...utronix.de>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: Re: [PATCH v3 1/3] KVM: arm/arm64: vgic: Make vgic_irq->irq_lock a
raw_spinlock
On Fri, Feb 01, 2019 at 03:30:58PM +0000, Julien Grall wrote:
> Hi Julien,
>
> On 07/01/2019 15:06, Julien Thierry wrote:
> > vgic_irq->irq_lock must always be taken with interrupts disabled as
> > it is used in interrupt context.
>
> I am a bit confused with the reason here. The code mention that ap_list_lock
> could be taken from the timer interrupt handler interrupt. I assume it
> speaks about the handler kvm_arch_timer_handler. Looking at the
> configuration of the interrupt, the flag IRQF_NO_THREAD is not set, so the
> interrupt should be threaded when CONFIG_PREEMPT_FULL is set. If my
> understanding is correct, this means the interrupt thread would sleep if it
> takes the spinlock.
>
> Did I miss anything? Do you have an exact path where the vGIC is actually
> called from an interrupt context?
The part you're missing is that percpu interrupts are not force
threaded:
static int irq_setup_forced_threading(struct irqaction *new)
{
if (!force_irqthreads)
return 0;
if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT))
return 0;
/* ...*/
}
Julia
Powered by blists - more mailing lists