All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Sami Mujawar <Sami.Mujawar@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev
Subject: Re: [PATCH v2 08/14] arm64/cpufeature: Detect PE support for FEAT_NMI
Date: Wed, 07 Dec 2022 19:06:36 +0000	[thread overview]
Message-ID: <87wn73rq2r.wl-maz@kernel.org> (raw)
In-Reply-To: <Y45HMaXwUcSHEplv@sirena.org.uk>

On Mon, 05 Dec 2022 19:32:01 +0000,
Mark Brown <broonie@kernel.org> wrote:
> 
> On Mon, Dec 05, 2022 at 06:03:07PM +0000, Marc Zyngier wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> 
> > > +#ifdef CONFIG_ARM64_NMI
> > > +	{
> > > +		.desc = "Non-maskable Interrupts",
> > > +		.capability = ARM64_HAS_NMI,
> > > +		.type = ARM64_CPUCAP_BOOT_CPU_FEATURE,
> 
> > PSEUDO_NMI uses ARM64_CPUCAP_STRICT_BOOT_CPU_FEATURE. What is the
> > rational for using a different policy here?
> 
> I couldn't identify any issues that the kernel would have if the feature
> was present in the hardware but unused so I didn't see the need to be
> additionally restrictive.  TBH I'm not 100% clear why the _STRICT is
> there for pseudo NMIs, it seemed a bit out of scope for this series to
> try to clean that up though.

Suzuki is your man for this, adding him to the party.

> 
> > The whole thing is way too restrictive: KVM definitely needs to know
> > that the feature exists, even if there is no use for it in the host
> > kernel. There is no reason why guests shouldn't be able to use this
> > even if the host doesn't care about it.
> 
> > Which means you need two properties: one that advertises the
> > availability of the feature, and one that makes use of it in the
> > kernel.
> 
> To be clear I think what you're looking for here is a capability that
> omits the cross-check with pseudo NMIs rather than something that's
> strictly checking the hardware (so ID register overrides will still
> apply)?  I've done that locally, my tree currently has capabilites
> HAS_NMI and USES_NMI.

Something like that, yes. And HAS_NMI should be unconditionally
enabled (command-line overrides notwithstanding).

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Sami Mujawar <Sami.Mujawar@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev
Subject: Re: [PATCH v2 08/14] arm64/cpufeature: Detect PE support for FEAT_NMI
Date: Wed, 07 Dec 2022 19:06:36 +0000	[thread overview]
Message-ID: <87wn73rq2r.wl-maz@kernel.org> (raw)
In-Reply-To: <Y45HMaXwUcSHEplv@sirena.org.uk>

On Mon, 05 Dec 2022 19:32:01 +0000,
Mark Brown <broonie@kernel.org> wrote:
> 
> On Mon, Dec 05, 2022 at 06:03:07PM +0000, Marc Zyngier wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> 
> > > +#ifdef CONFIG_ARM64_NMI
> > > +	{
> > > +		.desc = "Non-maskable Interrupts",
> > > +		.capability = ARM64_HAS_NMI,
> > > +		.type = ARM64_CPUCAP_BOOT_CPU_FEATURE,
> 
> > PSEUDO_NMI uses ARM64_CPUCAP_STRICT_BOOT_CPU_FEATURE. What is the
> > rational for using a different policy here?
> 
> I couldn't identify any issues that the kernel would have if the feature
> was present in the hardware but unused so I didn't see the need to be
> additionally restrictive.  TBH I'm not 100% clear why the _STRICT is
> there for pseudo NMIs, it seemed a bit out of scope for this series to
> try to clean that up though.

Suzuki is your man for this, adding him to the party.

> 
> > The whole thing is way too restrictive: KVM definitely needs to know
> > that the feature exists, even if there is no use for it in the host
> > kernel. There is no reason why guests shouldn't be able to use this
> > even if the host doesn't care about it.
> 
> > Which means you need two properties: one that advertises the
> > availability of the feature, and one that makes use of it in the
> > kernel.
> 
> To be clear I think what you're looking for here is a capability that
> omits the cross-check with pseudo NMIs rather than something that's
> strictly checking the hardware (so ID register overrides will still
> apply)?  I've done that locally, my tree currently has capabilites
> HAS_NMI and USES_NMI.

Something like that, yes. And HAS_NMI should be unconditionally
enabled (command-line overrides notwithstanding).

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-12-07 19:08 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12 15:16 [PATCH v2 00/14] arm64/nmi: Support for FEAT_NMI Mark Brown
2022-11-12 15:16 ` Mark Brown
2022-11-12 15:16 ` [PATCH v2 01/14] arm64/booting: Document boot requirements " Mark Brown
2022-11-12 15:16   ` Mark Brown
2022-11-12 15:16 ` [PATCH v2 02/14] arm64/sysreg: Add definition for ICC_NMIAR1_EL1 Mark Brown
2022-11-12 15:16   ` Mark Brown
2022-11-12 15:16 ` [PATCH v2 03/14] arm64/sysreg: Add definition of ISR_EL1 Mark Brown
2022-11-12 15:16   ` Mark Brown
2022-12-05 16:45   ` Marc Zyngier
2022-12-05 16:45     ` Marc Zyngier
2022-11-12 15:16 ` [PATCH v2 04/14] arm64/sysreg: Add definitions for immediate versions of MSR ALLINT Mark Brown
2022-11-12 15:16   ` Mark Brown
2022-12-05 16:38   ` Marc Zyngier
2022-12-05 16:38     ` Marc Zyngier
2022-12-05 17:11     ` Mark Brown
2022-12-05 17:11       ` Mark Brown
2022-12-07 19:18       ` Marc Zyngier
2022-12-07 19:18         ` Marc Zyngier
2022-12-07 19:42         ` Mark Brown
2022-12-07 19:42           ` Mark Brown
2022-11-12 15:16 ` [PATCH v2 05/14] arm64/asm: Introduce assembly macros for managing ALLINT Mark Brown
2022-11-12 15:16   ` Mark Brown
2022-12-05 17:29   ` Marc Zyngier
2022-12-05 17:29     ` Marc Zyngier
2022-12-05 18:24     ` Mark Brown
2022-12-05 18:24       ` Mark Brown
2022-12-07 19:14       ` Marc Zyngier
2022-12-07 19:14         ` Marc Zyngier
2022-11-12 15:17 ` [PATCH v2 06/14] arm64/hyp-stub: Enable access to ALLINT Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-12-05 17:50   ` Marc Zyngier
2022-12-05 17:50     ` Marc Zyngier
2022-11-12 15:17 ` [PATCH v2 07/14] arm64/idreg: Add an override for FEAT_NMI Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-11-12 15:17 ` [PATCH v2 08/14] arm64/cpufeature: Detect PE support " Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-12-05 18:03   ` Marc Zyngier
2022-12-05 18:03     ` Marc Zyngier
2022-12-05 19:32     ` Mark Brown
2022-12-05 19:32       ` Mark Brown
2022-12-07 19:06       ` Marc Zyngier [this message]
2022-12-07 19:06         ` Marc Zyngier
2022-11-12 15:17 ` [PATCH v2 09/14] KVM: arm64: Hide FEAT_NMI from guests Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-12-05 18:06   ` Marc Zyngier
2022-12-05 18:06     ` Marc Zyngier
2022-12-05 19:03     ` Mark Brown
2022-12-05 19:03       ` Mark Brown
2022-12-07 19:03       ` Marc Zyngier
2022-12-07 19:03         ` Marc Zyngier
2022-12-07 19:33         ` Mark Brown
2022-12-07 19:33           ` Mark Brown
2022-11-12 15:17 ` [PATCH v2 10/14] arm64/nmi: Manage masking for superpriority interrupts along with DAIF Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-12-05 18:47   ` Marc Zyngier
2022-12-05 18:47     ` Marc Zyngier
2022-12-05 20:52     ` Mark Brown
2022-12-05 20:52       ` Mark Brown
2022-12-08 17:19   ` Lorenzo Pieralisi
2022-12-08 17:19     ` Lorenzo Pieralisi
2022-12-12 14:03     ` Mark Brown
2022-12-12 14:03       ` Mark Brown
2022-12-13  8:37       ` Lorenzo Pieralisi
2022-12-13  8:37         ` Lorenzo Pieralisi
2022-12-13 13:15         ` Mark Brown
2022-12-13 13:15           ` Mark Brown
2022-12-15 13:32           ` Marc Zyngier
2022-12-15 13:32             ` Marc Zyngier
2022-12-12 14:40   ` Mark Rutland
2022-12-12 14:40     ` Mark Rutland
2022-12-15 13:21     ` Mark Brown
2022-12-15 13:21       ` Mark Brown
2022-11-12 15:17 ` [PATCH v2 11/14] arm64/irq: Document handling of FEAT_NMI in irqflags.h Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-11-12 15:17 ` [PATCH v2 12/14] arm64/nmi: Add handling of superpriority interrupts as NMIs Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-12-07 11:03   ` Marc Zyngier
2022-12-07 11:03     ` Marc Zyngier
2022-12-07 13:24     ` Mark Brown
2022-12-07 13:24       ` Mark Brown
2022-12-07 18:57       ` Marc Zyngier
2022-12-07 18:57         ` Marc Zyngier
2022-12-07 19:15         ` Mark Brown
2022-12-07 19:15           ` Mark Brown
2022-11-12 15:17 ` [PATCH v2 13/14] arm64/nmi: Add Kconfig for NMI Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-11-12 15:17 ` [PATCH v2 14/14] irqchip/gic-v3: Implement FEAT_GICv3_NMI support Mark Brown
2022-11-12 15:17   ` Mark Brown
2022-12-07 15:20   ` Marc Zyngier
2022-12-07 15:20     ` Marc Zyngier
2022-12-02 18:42 ` [PATCH v2 00/14] arm64/nmi: Support for FEAT_NMI Marc Zyngier
2022-12-02 18:42   ` Marc Zyngier
2022-12-03  8:25   ` Lorenzo Pieralisi
2022-12-03  8:25     ` Lorenzo Pieralisi
2022-12-03  9:45     ` Marc Zyngier
2022-12-03  9:45       ` Marc Zyngier

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=87wn73rq2r.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=Sami.Mujawar@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.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.