From: daniel.thompson@linaro.org (Daniel Thompson)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/7] Pseudo-NMI for arm64 using ICC_PMR_EL1 (GICv3)
Date: Wed, 08 Apr 2015 13:27:39 +0100 [thread overview]
Message-ID: <55251EBB.3000106@linaro.org> (raw)
In-Reply-To: <551C0EE2.2040800@arm.com>
On 01/04/15 16:29, Marc Zyngier wrote:
> On 01/04/15 16:15, Dave P Martin wrote:
>> Apologies for the slow reply... :/
>>
>> Anyway,
>>
>> On Mon, Mar 23, 2015 at 06:47:53PM +0000, Daniel Thompson wrote:
>>> On 20/03/15 15:45, Dave Martin wrote:
>>>> On Wed, Mar 18, 2015 at 02:20:21PM +0000, Daniel Thompson wrote:
>>>>> This patchset provides a pseudo-NMI for arm64 kernels by reimplementing
>>>>> the irqflags macros to modify the GIC PMR (the priority mask register is
>>>>> accessible as a system register on GICv3 and later) rather than the
>>>>> PSR. The pseudo-NMI changes are support by a prototype implementation of
>>>>> arch_trigger_all_cpu_backtrace that allows the new code to be exercised.
>>
>> Minor nit: the "pseudo NMI" terminology could lead to confusion if
>> something more closely resembling a real NMI comes along.
>>
>> I'll have to have a think, but nothing comes to mind right now...
>>
>> [...]
>>
>>>>> 3. Requires GICv3+ hardware together with firmware support to enable
>>>>> GICv3 features at EL3. If CONFIG_USE_ICC_SYSREGS_FOR_IRQFLAGS is
>>>>> enabled the kernel will not boot on older hardware. It will be hard
>>>>> to diagnose because we will crash very early in the boot (i.e.
>>>>> before the call to start_kernel). Auto-detection might be possible
>>>>> but the performance and code size cost of adding conditional code to
>>>>> the irqflags macros probably makes it impractical. As such it may
>>>>> never be possible to remove this limitation (although it might be
>>>>> possible to find a way to survive long enough to panic and show the
>>>>> results on the console).
>>>>
>>>> This can (and should) be done via patching -- otherwise we risk breaking
>>>> single kernel image for GICv2+v3.
>>>
>>> Do you mean real patching (hunting down all those inlines and
>>> rewrite them) or simply implementing irqflags with an ops table? If
>>> the former I didn't look at this because I didn't release we could
>>> do that...
>>
>> A generic patching framework was introduced by Andre Przywara in this
>> patch:
>>
>> e039ee4 arm64: add alternative runtime patching
>>
>> I believe you should be able to use this to patch between DAIF and
>> ICC_PMR accesses.
>>
>> You should be able to find examples of this framework being used by
>> grepping. I've not played with it myself yet.
>
> To follow-up on this, I have a few patches queued that use the runtime
> patching code to deal with GICv3 in KVM:
>
> http://thread.gmane.org/gmane.comp.emulators.kvm.arm.devel/616
>
> The first few patches are already queued for v4.1, and the rest should
> follow shortly after.
Thanks (both).
That's really helpful: links for that sort of thing are not easily
googleable (things like kpatch floods the results).
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Marc Zyngier <marc.zyngier@arm.com>, Dave P Martin <Dave.Martin@arm.com>
Cc: "linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
"patches@linaro.org" <patches@linaro.org>,
Catalin Marinas <Catalin.Marinas@arm.com>,
Will Deacon <Will.Deacon@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>,
Andrew Thoelke <Andrew.Thoelke@arm.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 0/7] Pseudo-NMI for arm64 using ICC_PMR_EL1 (GICv3)
Date: Wed, 08 Apr 2015 13:27:39 +0100 [thread overview]
Message-ID: <55251EBB.3000106@linaro.org> (raw)
In-Reply-To: <551C0EE2.2040800@arm.com>
On 01/04/15 16:29, Marc Zyngier wrote:
> On 01/04/15 16:15, Dave P Martin wrote:
>> Apologies for the slow reply... :/
>>
>> Anyway,
>>
>> On Mon, Mar 23, 2015 at 06:47:53PM +0000, Daniel Thompson wrote:
>>> On 20/03/15 15:45, Dave Martin wrote:
>>>> On Wed, Mar 18, 2015 at 02:20:21PM +0000, Daniel Thompson wrote:
>>>>> This patchset provides a pseudo-NMI for arm64 kernels by reimplementing
>>>>> the irqflags macros to modify the GIC PMR (the priority mask register is
>>>>> accessible as a system register on GICv3 and later) rather than the
>>>>> PSR. The pseudo-NMI changes are support by a prototype implementation of
>>>>> arch_trigger_all_cpu_backtrace that allows the new code to be exercised.
>>
>> Minor nit: the "pseudo NMI" terminology could lead to confusion if
>> something more closely resembling a real NMI comes along.
>>
>> I'll have to have a think, but nothing comes to mind right now...
>>
>> [...]
>>
>>>>> 3. Requires GICv3+ hardware together with firmware support to enable
>>>>> GICv3 features at EL3. If CONFIG_USE_ICC_SYSREGS_FOR_IRQFLAGS is
>>>>> enabled the kernel will not boot on older hardware. It will be hard
>>>>> to diagnose because we will crash very early in the boot (i.e.
>>>>> before the call to start_kernel). Auto-detection might be possible
>>>>> but the performance and code size cost of adding conditional code to
>>>>> the irqflags macros probably makes it impractical. As such it may
>>>>> never be possible to remove this limitation (although it might be
>>>>> possible to find a way to survive long enough to panic and show the
>>>>> results on the console).
>>>>
>>>> This can (and should) be done via patching -- otherwise we risk breaking
>>>> single kernel image for GICv2+v3.
>>>
>>> Do you mean real patching (hunting down all those inlines and
>>> rewrite them) or simply implementing irqflags with an ops table? If
>>> the former I didn't look at this because I didn't release we could
>>> do that...
>>
>> A generic patching framework was introduced by Andre Przywara in this
>> patch:
>>
>> e039ee4 arm64: add alternative runtime patching
>>
>> I believe you should be able to use this to patch between DAIF and
>> ICC_PMR accesses.
>>
>> You should be able to find examples of this framework being used by
>> grepping. I've not played with it myself yet.
>
> To follow-up on this, I have a few patches queued that use the runtime
> patching code to deal with GICv3 in KVM:
>
> http://thread.gmane.org/gmane.comp.emulators.kvm.arm.devel/616
>
> The first few patches are already queued for v4.1, and the rest should
> follow shortly after.
Thanks (both).
That's really helpful: links for that sort of thing are not easily
googleable (things like kpatch floods the results).
next prev parent reply other threads:[~2015-04-08 12:27 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 14:20 [RFC PATCH 0/7] Pseudo-NMI for arm64 using ICC_PMR_EL1 (GICv3) Daniel Thompson
2015-03-18 14:20 ` Daniel Thompson
2015-03-18 14:20 ` [RFC PATCH 1/7] serial: Emulate break using control characters Daniel Thompson
2015-03-18 14:20 ` Daniel Thompson
2015-03-19 22:05 ` Peter Hurley
2015-03-19 22:05 ` Peter Hurley
2015-03-23 15:14 ` Daniel Thompson
2015-03-23 15:14 ` Daniel Thompson
2015-03-20 14:28 ` Dave Martin
2015-03-20 14:28 ` Dave Martin
2015-03-23 15:28 ` Daniel Thompson
2015-03-23 15:28 ` Daniel Thompson
2015-03-23 16:28 ` Dave Martin
2015-03-23 16:28 ` Dave Martin
2015-03-23 19:05 ` One Thousand Gnomes
2015-03-23 19:05 ` One Thousand Gnomes
2015-03-18 14:20 ` [RFC PATCH 2/7] printk: Simple implementation for NMI backtracing Daniel Thompson
2015-03-18 14:20 ` Daniel Thompson
2015-03-19 17:39 ` Steven Rostedt
2015-03-19 17:39 ` Steven Rostedt
2015-03-19 18:30 ` Peter Zijlstra
2015-03-19 18:30 ` Peter Zijlstra
2015-03-19 18:48 ` Daniel Thompson
2015-03-19 18:48 ` Daniel Thompson
2015-03-19 19:01 ` Steven Rostedt
2015-03-19 19:01 ` Steven Rostedt
2015-03-23 14:51 ` Daniel Thompson
2015-03-23 14:51 ` Daniel Thompson
2015-03-18 14:20 ` [RFC PATCH 3/7] irqchip: gic-v3: Reset BPR during initialization Daniel Thompson
2015-03-18 14:20 ` Daniel Thompson
2015-03-18 14:20 ` [RFC PATCH 4/7] arm64: irqflags: Reorder the fiq & async macros Daniel Thompson
2015-03-18 14:20 ` Daniel Thompson
2015-03-18 14:20 ` [RFC PATCH 5/7] arm64: irqflags: Use ICC sysregs to implement IRQ masking Daniel Thompson
2015-03-18 14:20 ` Daniel Thompson
2015-03-18 14:20 ` [RFC PATCH 6/7] arm64: irqflags: Automatically identify I bit mis-management Daniel Thompson
2015-03-18 14:20 ` Daniel Thompson
2015-03-18 14:20 ` [RFC PATCH 7/7] arm64: Add support for on-demand backtrace of other CPUs Daniel Thompson
2015-03-18 14:20 ` Daniel Thompson
2015-03-20 15:45 ` [RFC PATCH 0/7] Pseudo-NMI for arm64 using ICC_PMR_EL1 (GICv3) Dave Martin
2015-03-20 15:45 ` Dave Martin
2015-03-23 18:47 ` Daniel Thompson
2015-03-23 18:47 ` Daniel Thompson
2015-04-01 15:15 ` Dave Martin
2015-04-01 15:15 ` Dave Martin
2015-04-01 15:29 ` Marc Zyngier
2015-04-01 15:29 ` Marc Zyngier
2015-04-08 12:27 ` Daniel Thompson [this message]
2015-04-08 12:27 ` Daniel Thompson
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=55251EBB.3000106@linaro.org \
--to=daniel.thompson@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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.