From: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 2/5] powerpc/64s: Add new security feature flags for count cache flush
Date: Tue, 24 Jul 2018 01:07:53 +1000 [thread overview]
Message-ID: <20180723150756.11108-2-mpe@ellerman.id.au> (raw)
In-Reply-To: <20180723150756.11108-1-mpe@ellerman.id.au>
Add security feature flags to indicate the need for software to flush
the count cache on context switch, and for the presence of a hardware
assisted count cache flush.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/include/asm/security_features.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/include/asm/security_features.h b/arch/powerpc/include/asm/security_features.h
index 44989b22383c..a0d47bc18a5c 100644
--- a/arch/powerpc/include/asm/security_features.h
+++ b/arch/powerpc/include/asm/security_features.h
@@ -59,6 +59,9 @@ static inline bool security_ftr_enabled(unsigned long feature)
// Indirect branch prediction cache disabled
#define SEC_FTR_COUNT_CACHE_DISABLED 0x0000000000000020ull
+// bcctr 2,0,0 triggers a hardware assisted count cache flush
+#define SEC_FTR_BCCTR_FLUSH_ASSIST 0x0000000000000800ull
+
// Features indicating need for Spectre/Meltdown mitigations
@@ -74,6 +77,9 @@ static inline bool security_ftr_enabled(unsigned long feature)
// Firmware configuration indicates user favours security over performance
#define SEC_FTR_FAVOUR_SECURITY 0x0000000000000200ull
+// Software required to flush count cache on context switch
+#define SEC_FTR_FLUSH_COUNT_CACHE 0x0000000000000400ull
+
// Features enabled by default
#define SEC_FTR_DEFAULT \
--
2.14.1
next prev parent reply other threads:[~2018-07-23 15:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 15:07 [PATCH 1/5] powerpc/asm: Add a patch_site macro & helpers for patching instructions Michael Ellerman
2018-07-23 15:07 ` Michael Ellerman [this message]
2018-07-23 15:07 ` [PATCH 3/5] powerpc/64s: Add support for software count cache flush Michael Ellerman
2018-07-23 15:07 ` [PATCH 4/5] powerpc/pseries: Query hypervisor for count cache flush settings Michael Ellerman
2018-07-23 15:07 ` [PATCH 5/5] powerpc/powernv: Query firmware " Michael Ellerman
2018-08-08 14:25 ` [1/5] powerpc/asm: Add a patch_site macro & helpers for patching instructions Michael Ellerman
2018-08-08 16:30 ` [PATCH 1/5] " Christophe LEROY
2018-08-09 6:56 ` Christophe LEROY
2018-08-09 9:52 ` Michael Ellerman
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=20180723150756.11108-2-mpe@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox