All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Shuah Khan <shuah@kernel.org>
Cc: Alan Hayward <alan.hayward@arm.com>,
	Luis Machado <luis.machado@arm.com>,
	Salil Akerkar <Salil.Akerkar@arm.com>,
	Basant Kumar Dwivedi <Basant.KumarDwivedi@arm.com>,
	Szabolcs Nagy <szabolcs.nagy@arm.com>,
	James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
	Mark Brown <broonie@kernel.org>
Subject: [PATCH v10 01/39] arm64: Define CPACR_EL1_FPEN similarly to other floating point controls
Date: Wed, 26 Jan 2022 15:27:11 +0000	[thread overview]
Message-ID: <20220126152749.233712-2-broonie@kernel.org> (raw)
In-Reply-To: <20220126152749.233712-1-broonie@kernel.org>

The base floating point, SVE and SME all have enable controls for EL0 and
EL1 in CPACR_EL1 which have a similar layout and function. Currently the
basic floating point enable FPEN is defined differently to the SVE control,
specified as a single define in kvm_arm.h rather than in sysreg.h. Move the
define to sysreg.h and provide separate EL0 and EL1 control bits so code
managing the different floating point enables can look consistent.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/include/asm/kvm_arm.h | 1 -
 arch/arm64/include/asm/sysreg.h  | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h
index 01d47c5886dc..eec790842fe2 100644
--- a/arch/arm64/include/asm/kvm_arm.h
+++ b/arch/arm64/include/asm/kvm_arm.h
@@ -355,7 +355,6 @@
 	ECN(SOFTSTP_CUR), ECN(WATCHPT_LOW), ECN(WATCHPT_CUR), \
 	ECN(BKPT32), ECN(VECTOR32), ECN(BRK64)
 
-#define CPACR_EL1_FPEN		(3 << 20)
 #define CPACR_EL1_TTA		(1 << 28)
 #define CPACR_EL1_DEFAULT	(CPACR_EL1_FPEN | CPACR_EL1_ZEN_EL1EN)
 
diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
index 898bee0004ae..1da4c43d597d 100644
--- a/arch/arm64/include/asm/sysreg.h
+++ b/arch/arm64/include/asm/sysreg.h
@@ -1097,6 +1097,10 @@
 #define ZCR_ELx_LEN_SIZE	9
 #define ZCR_ELx_LEN_MASK	0x1ff
 
+#define CPACR_EL1_FPEN_EL1EN	(BIT(20)) /* enable EL1 access */
+#define CPACR_EL1_FPEN_EL0EN	(BIT(21)) /* enable EL0 access, if EL1EN set */
+#define CPACR_EL1_FPEN		(CPACR_EL1_FPEN_EL1EN | CPACR_EL1_FPEN_EL0EN)
+
 #define CPACR_EL1_ZEN_EL1EN	(BIT(16)) /* enable EL1 access */
 #define CPACR_EL1_ZEN_EL0EN	(BIT(17)) /* enable EL0 access, if EL1EN set */
 #define CPACR_EL1_ZEN		(CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN)
-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Shuah Khan <shuah@kernel.org>
Cc: Basant Kumar Dwivedi <Basant.KumarDwivedi@arm.com>,
	Luis Machado <luis.machado@arm.com>,
	Szabolcs Nagy <szabolcs.nagy@arm.com>,
	Mark Brown <broonie@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org,
	Alan Hayward <alan.hayward@arm.com>,
	kvmarm@lists.cs.columbia.edu,
	Salil Akerkar <Salil.Akerkar@arm.com>
Subject: [PATCH v10 01/39] arm64: Define CPACR_EL1_FPEN similarly to other floating point controls
Date: Wed, 26 Jan 2022 15:27:11 +0000	[thread overview]
Message-ID: <20220126152749.233712-2-broonie@kernel.org> (raw)
In-Reply-To: <20220126152749.233712-1-broonie@kernel.org>

The base floating point, SVE and SME all have enable controls for EL0 and
EL1 in CPACR_EL1 which have a similar layout and function. Currently the
basic floating point enable FPEN is defined differently to the SVE control,
specified as a single define in kvm_arm.h rather than in sysreg.h. Move the
define to sysreg.h and provide separate EL0 and EL1 control bits so code
managing the different floating point enables can look consistent.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/include/asm/kvm_arm.h | 1 -
 arch/arm64/include/asm/sysreg.h  | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h
index 01d47c5886dc..eec790842fe2 100644
--- a/arch/arm64/include/asm/kvm_arm.h
+++ b/arch/arm64/include/asm/kvm_arm.h
@@ -355,7 +355,6 @@
 	ECN(SOFTSTP_CUR), ECN(WATCHPT_LOW), ECN(WATCHPT_CUR), \
 	ECN(BKPT32), ECN(VECTOR32), ECN(BRK64)
 
-#define CPACR_EL1_FPEN		(3 << 20)
 #define CPACR_EL1_TTA		(1 << 28)
 #define CPACR_EL1_DEFAULT	(CPACR_EL1_FPEN | CPACR_EL1_ZEN_EL1EN)
 
diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
index 898bee0004ae..1da4c43d597d 100644
--- a/arch/arm64/include/asm/sysreg.h
+++ b/arch/arm64/include/asm/sysreg.h
@@ -1097,6 +1097,10 @@
 #define ZCR_ELx_LEN_SIZE	9
 #define ZCR_ELx_LEN_MASK	0x1ff
 
+#define CPACR_EL1_FPEN_EL1EN	(BIT(20)) /* enable EL1 access */
+#define CPACR_EL1_FPEN_EL0EN	(BIT(21)) /* enable EL0 access, if EL1EN set */
+#define CPACR_EL1_FPEN		(CPACR_EL1_FPEN_EL1EN | CPACR_EL1_FPEN_EL0EN)
+
 #define CPACR_EL1_ZEN_EL1EN	(BIT(16)) /* enable EL1 access */
 #define CPACR_EL1_ZEN_EL0EN	(BIT(17)) /* enable EL0 access, if EL1EN set */
 #define CPACR_EL1_ZEN		(CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN)
-- 
2.30.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Shuah Khan <shuah@kernel.org>
Cc: Alan Hayward <alan.hayward@arm.com>,
	Luis Machado <luis.machado@arm.com>,
	Salil Akerkar <Salil.Akerkar@arm.com>,
	Basant Kumar Dwivedi <Basant.KumarDwivedi@arm.com>,
	Szabolcs Nagy <szabolcs.nagy@arm.com>,
	James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
	Mark Brown <broonie@kernel.org>
Subject: [PATCH v10 01/39] arm64: Define CPACR_EL1_FPEN similarly to other floating point controls
Date: Wed, 26 Jan 2022 15:27:11 +0000	[thread overview]
Message-ID: <20220126152749.233712-2-broonie@kernel.org> (raw)
In-Reply-To: <20220126152749.233712-1-broonie@kernel.org>

The base floating point, SVE and SME all have enable controls for EL0 and
EL1 in CPACR_EL1 which have a similar layout and function. Currently the
basic floating point enable FPEN is defined differently to the SVE control,
specified as a single define in kvm_arm.h rather than in sysreg.h. Move the
define to sysreg.h and provide separate EL0 and EL1 control bits so code
managing the different floating point enables can look consistent.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/include/asm/kvm_arm.h | 1 -
 arch/arm64/include/asm/sysreg.h  | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h
index 01d47c5886dc..eec790842fe2 100644
--- a/arch/arm64/include/asm/kvm_arm.h
+++ b/arch/arm64/include/asm/kvm_arm.h
@@ -355,7 +355,6 @@
 	ECN(SOFTSTP_CUR), ECN(WATCHPT_LOW), ECN(WATCHPT_CUR), \
 	ECN(BKPT32), ECN(VECTOR32), ECN(BRK64)
 
-#define CPACR_EL1_FPEN		(3 << 20)
 #define CPACR_EL1_TTA		(1 << 28)
 #define CPACR_EL1_DEFAULT	(CPACR_EL1_FPEN | CPACR_EL1_ZEN_EL1EN)
 
diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
index 898bee0004ae..1da4c43d597d 100644
--- a/arch/arm64/include/asm/sysreg.h
+++ b/arch/arm64/include/asm/sysreg.h
@@ -1097,6 +1097,10 @@
 #define ZCR_ELx_LEN_SIZE	9
 #define ZCR_ELx_LEN_MASK	0x1ff
 
+#define CPACR_EL1_FPEN_EL1EN	(BIT(20)) /* enable EL1 access */
+#define CPACR_EL1_FPEN_EL0EN	(BIT(21)) /* enable EL0 access, if EL1EN set */
+#define CPACR_EL1_FPEN		(CPACR_EL1_FPEN_EL1EN | CPACR_EL1_FPEN_EL0EN)
+
 #define CPACR_EL1_ZEN_EL1EN	(BIT(16)) /* enable EL1 access */
 #define CPACR_EL1_ZEN_EL0EN	(BIT(17)) /* enable EL0 access, if EL1EN set */
 #define CPACR_EL1_ZEN		(CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN)
-- 
2.30.2


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

  reply	other threads:[~2022-01-26 15:30 UTC|newest]

Thread overview: 127+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 15:27 [PATCH v10 00/39] arm64/sme: Initial support for the Scalable Matrix Extension Mark Brown
2022-01-26 15:27 ` Mark Brown
2022-01-26 15:27 ` Mark Brown
2022-01-26 15:27 ` Mark Brown [this message]
2022-01-26 15:27   ` [PATCH v10 01/39] arm64: Define CPACR_EL1_FPEN similarly to other floating point controls Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 02/39] arm64: Always use individual bits in CPACR floating point enables Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 03/39] arm64: cpufeature: Always specify and use a field width for capabilities Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 04/39] kselftest/arm64: Remove local ARRAY_SIZE() definitions Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 05/39] arm64/sme: Provide ABI documentation for SME Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 06/39] arm64/sme: System register and exception syndrome definitions Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 07/39] arm64/sme: Manually encode SME instructions Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 08/39] arm64/sme: Early CPU setup for SME Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 09/39] arm64/sme: Basic enumeration support Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-11-08 16:30   ` Christophe Fergeau
2022-11-09 13:32     ` Mark Brown
2022-11-09 15:24       ` Christophe Fergeau
2022-11-09 15:52         ` Mark Brown
2022-11-14 14:08         ` Catalin Marinas
2022-11-15  9:10           ` Christophe Fergeau
2022-11-15 10:42           ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 10/39] arm64/sme: Identify supported SME vector lengths at boot Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 11/39] arm64/sme: Implement sysctl to set the default vector length Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 12/39] arm64/sme: Implement vector length configuration prctl()s Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 13/39] arm64/sme: Implement support for TPIDR2 Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 14/39] arm64/sme: Implement SVCR context switching Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 15/39] arm64/sme: Implement streaming SVE " Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 16/39] arm64/sme: Implement ZA " Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 17/39] arm64/sme: Implement traps and syscall handling for SME Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 18/39] arm64/sme: Disable ZA and streaming mode when handling signals Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 19/39] arm64/sme: Implement streaming SVE signal handling Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 20/39] arm64/sme: Implement ZA " Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 21/39] arm64/sme: Implement ptrace support for streaming mode SVE registers Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 22/39] arm64/sme: Add ptrace support for ZA Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 23/39] arm64/sme: Disable streaming mode and ZA when flushing CPU state Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 24/39] arm64/sme: Save and restore streaming mode over EFI runtime calls Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 25/39] KVM: arm64: Hide SME system registers from guests Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 26/39] KVM: arm64: Trap SME usage in guest Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 27/39] KVM: arm64: Handle SME host state when running guests Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 28/39] arm64/sme: Provide Kconfig for SME Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 29/39] kselftest/arm64: sme: Add streaming SME support to vlset Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 30/39] kselftest/arm64: Add tests for TPIDR2 Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 31/39] kselftest/arm64: Extend vector configuration API tests to cover SME Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 32/39] kselftest/arm64: sme: Provide streaming mode SVE stress test Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 33/39] kselftest/arm64: signal: Allow tests to be incompatible with features Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 34/39] kselftest/arm64: signal: Handle ZA signal context in core code Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 35/39] kselftest/arm64: Add stress test for SME ZA context switching Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 36/39] kselftest/arm64: signal: Add SME signal handling tests Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 37/39] kselftest/arm64: Add streaming SVE to SVE ptrace tests Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 38/39] kselftest/arm64: Add coverage for the ZA ptrace interface Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27 ` [PATCH v10 39/39] kselftest/arm64: Add SME support to syscall ABI test Mark Brown
2022-01-26 15:27   ` Mark Brown
2022-01-26 15:27   ` Mark Brown

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=20220126152749.233712-2-broonie@kernel.org \
    --to=broonie@kernel.org \
    --cc=Basant.KumarDwivedi@arm.com \
    --cc=Salil.Akerkar@arm.com \
    --cc=alan.hayward@arm.com \
    --cc=alexandru.elisei@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luis.machado@arm.com \
    --cc=maz@kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=suzuki.poulose@arm.com \
    --cc=szabolcs.nagy@arm.com \
    --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.