mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Cc: mark.rutland@arm.com, ckadabi@codeaurora.org,
	ard.biesheuvel@linaro.org, marc.zyngier@arm.com,
	catalin.marinas@arm.com, will.deacon@arm.com,
	linux-kernel@vger.kernel.org, jnair@caviumnetworks.com,
	robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 15/22] arm64: capabilities: Change scope of VHE to Boot CPU feature
Date: Thu, 8 Mar 2018 13:43:50 +0000	[thread overview]
Message-ID: <20180308134348.GP32331@e103592.cambridge.arm.com> (raw)
In-Reply-To: <25d774db-0ebd-b06d-20b5-5e31ede58fa3@arm.com>

On Thu, Mar 08, 2018 at 12:10:22PM +0000, Suzuki K Poulose wrote:
> On 12/02/18 17:17, Dave Martin wrote:
> >On Fri, Feb 09, 2018 at 05:54:59PM +0000, Suzuki K Poulose wrote:
> >>We expect all CPUs to be running at the same EL inside the kernel
> >>with or without VHE enabled and we have strict checks to ensure
> >>that any mismatch triggers a kernel panic. If VHE is enabled,
> >>we use the feature based on the boot CPU and all other CPUs
> >>should follow. This makes it a perfect candidate for a cpability
> >
> >capability
> >
> >>based on the boot CPU,  which should be matched by all the CPUs
> >>(both when is ON and OFF). This saves us some not-so-pretty
> >>hooks and special code, just for verifying the conflict.
> >>
> >>Cc: Marc Zyngier <marc.zyngier@arm.com>
> >>Cc: Dave Martin <dave.martin@arm.com>
> >>Cc: Will Deacon <will.deacon@arm.com>
> >>Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> >>---
> >>  arch/arm64/include/asm/cpufeature.h |  7 +++++++
> >>  arch/arm64/include/asm/virt.h       |  6 ------
> >>  arch/arm64/kernel/cpufeature.c      |  5 +++--
> >>  arch/arm64/kernel/smp.c             | 38 -------------------------------------
> >>  4 files changed, 10 insertions(+), 46 deletions(-)
> >>
> >>diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
> >>index 5f56a8342065..dfce93f79ae7 100644
> >>--- a/arch/arm64/include/asm/cpufeature.h
> >>+++ b/arch/arm64/include/asm/cpufeature.h
> >>@@ -276,6 +276,13 @@ extern struct arm64_ftr_reg arm64_ftr_reg_ctrel0;
> >>  	(ARM64_CPUCAP_SCOPE_LOCAL_CPU		|	\
> >>  	 ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU)
> >>+/*
> >>+ * Critical CPU feature used early in the boot based on the boot CPU.
> >>+ * The feature should be matched by all booting CPU (both miss and hit
> >>+ * cases).
> >>+ */
> >>+#define ARM64_CPUCAP_CRITICAL_BOOT_CPU_FEATURE ARM64_CPUCAP_SCOPE_BOOT_CPU
> >>+
> >
> >Nit: would it be consistent with the uses we already have for the word
> >"strict" to use that word here?  i.e.,
> >ARM64_CPUCAP_STRICT_BOOT_CPU_FEATURE.
> >Or do you think that would be more confusing?
> 
> We don't use the "STRICT" tag anymore. Moreover, I used CRITICAL to indicate
> that it is special in a way that all the "late" CPUs (in this case all
> secondaries) should match the "state" of the capability  (i.e, both ON and OFF)
> as that of the boot CPU. I am OK to change it to STRICT.

OK, I think so long as the definition is clear the precise name doesn't
matter too much.

I suggest deleting "critical" from the comment though, since that
suggests a circular definition.  The meaning seems clear(er) without
it.

[...]

Cheers
---Dave

  reply	other threads:[~2018-03-08 13:43 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 17:54 [PATCH v3 00/21] arm64: Rework cpu capabilities handling Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 01/21] arm64: capabilities: Move errata work around check on boot CPU Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 01/22] arm64: capabilities: Update prototype for enable call back Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 02/21] arm64: capabilities: Move errata processing code Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 02/22] arm64: capabilities: Move errata work around check on boot CPU Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 03/22] arm64: capabilities: Move errata processing code Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 03/21] arm64: capabilities: Prepare for fine grained capabilities Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 04/21] arm64: capabilities: Add flags to handle the conflicts on late CPU Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 04/22] arm64: capabilities: Prepare for fine grained capabilities Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 05/22] arm64: capabilities: Add flags to handle the conflicts on late CPU Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 05/21] arm64: capabilities: Unify the verification Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 06/21] arm64: capabilities: Filter the entries based on a given mask Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 06/22] arm64: capabilities: Unify the verification Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 07/22] arm64: capabilities: Filter the entries based on a given mask Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 07/21] arm64: capabilities: Prepare for grouping features and errata work arounds Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 08/22] " Suzuki K Poulose
2018-02-09 18:11   ` Dave Martin
2018-02-09 17:54 ` [PATCH v3 08/21] arm64: capabilities: Split the processing of " Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 09/21] arm64: capabilities: Allow features based on local CPU scope Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds Suzuki K Poulose
2018-02-09 18:18   ` Dave Martin
2018-03-08 12:24     ` Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 10/22] arm64: capabilities: Allow features based on local CPU scope Suzuki K Poulose
2018-02-09 18:22   ` Dave Martin
2018-03-08 12:14     ` Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 10/21] arm64: capabilities: Group handling of features and errata workarounds Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 11/22] " Suzuki K Poulose
2018-02-09 18:25   ` Dave Martin
2018-02-09 17:54 ` [PATCH v3 11/21] arm64: capabilities: Introduce weak features based on local CPU Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 12/22] " Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 12/21] arm64: capabilities: Restrict KPTI detection to boot-time CPUs Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 13/21] arm64: capabilities: Add support for features enabled early Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 13/22] arm64: capabilities: Restrict KPTI detection to boot-time CPUs Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 14/22] arm64: capabilities: Add support for features enabled early Suzuki K Poulose
2018-02-12 17:17   ` Dave Martin
2018-03-07 17:42     ` Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 14/21] arm64: capabilities: Change scope of VHE to Boot CPU feature Suzuki K Poulose
2018-02-09 17:54 ` [PATCH v3 15/22] " Suzuki K Poulose
2018-02-12 17:17   ` Dave Martin
2018-03-08 12:10     ` Suzuki K Poulose
2018-03-08 13:43       ` Dave Martin [this message]
2018-02-09 17:55 ` [PATCH v3 15/21] arm64: capabilities: Clean up midr range helpers Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 16/21] arm64: Add helpers for checking CPU MIDR against a range Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 16/22] arm64: capabilities: Clean up midr range helpers Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 17/22] arm64: Add helpers for checking CPU MIDR against a range Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 17/21] arm64: capabilities: Add support for checks based on a list of MIDRs Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 18/22] " Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 18/21] arm64: capabilities: Handle shared entries Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 19/21] arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35 Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 19/22] arm64: capabilities: Handle shared entries Suzuki K Poulose
2018-02-12 17:17   ` Dave Martin
2018-03-08 12:16     ` Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 20/22] arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35 Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 20/21] arm64: Delay enabling hardware DBM feature Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 21/21] arm64: Add work around for Arm Cortex-A55 Erratum 1024718 Suzuki K Poulose
2018-02-09 17:55 ` [PATCH v3 21/22] arm64: Delay enabling hardware DBM feature Suzuki K Poulose
2018-02-09 18:58   ` Dave Martin
2018-03-07 17:39     ` Suzuki K Poulose
2018-03-08 13:53       ` Dave Martin
2018-03-08 13:55         ` Mark Rutland
2018-02-09 17:55 ` [PATCH v3 22/22] arm64: Add work around for Arm Cortex-A55 Erratum 1024718 Suzuki K Poulose
2018-02-09 18:04 ` [PATCH v3 00/21] arm64: Rework cpu capabilities handling Suzuki K Poulose

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=20180308134348.GP32331@e103592.cambridge.arm.com \
    --to=dave.martin@arm.com \
    --cc=Suzuki.Poulose@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=ckadabi@codeaurora.org \
    --cc=jnair@caviumnetworks.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=will.deacon@arm.com \
    /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

Powered by JetHome