From: "tip-bot2 for Elena Reshetova" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Elena Reshetova <elena.reshetova@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Jarkko Sakkinen <jarkko@kernel.org>,
Kai Huang <kai.huang@intel.com>,
Nataliia Bondarevska <bondarn@google.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/sgx] x86/cpufeatures: Add X86_FEATURE_SGX_EUPDATESVN feature flag
Date: Thu, 16 Oct 2025 21:53:18 -0000 [thread overview]
Message-ID: <176065159861.709179.13171067458385458125.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20251016131314.17153-3-elena.reshetova@intel.com>
The following commit has been merged into the x86/sgx branch of tip:
Commit-ID: 6ffdb49101f023136a9a1fb0deb59eba73c306a3
Gitweb: https://git.kernel.org/tip/6ffdb49101f023136a9a1fb0deb59eba73c306a3
Author: Elena Reshetova <elena.reshetova@intel.com>
AuthorDate: Thu, 16 Oct 2025 16:11:05 +03:00
Committer: Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Thu, 16 Oct 2025 14:42:08 -07:00
x86/cpufeatures: Add X86_FEATURE_SGX_EUPDATESVN feature flag
Add a flag indicating whenever ENCLS[EUPDATESVN] SGX instruction is
supported. This will be used by SGX driver to perform CPU SVN updates.
Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Tested-by: Nataliia Bondarevska <bondarn@google.com>
---
arch/x86/include/asm/cpufeatures.h | 1 +
arch/x86/kernel/cpu/cpuid-deps.c | 1 +
arch/x86/kernel/cpu/scattered.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index 4091a77..76364b6 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -499,6 +499,7 @@
#define X86_FEATURE_IBPB_EXIT_TO_USER (21*32+14) /* Use IBPB on exit-to-userspace, see VMSCAPE bug */
#define X86_FEATURE_ABMC (21*32+15) /* Assignable Bandwidth Monitoring Counters */
#define X86_FEATURE_MSR_IMM (21*32+16) /* MSR immediate form instructions */
+#define X86_FEATURE_SGX_EUPDATESVN (21*32+17) /* Support for ENCLS[EUPDATESVN] instruction */
/*
* BUG word(s)
diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-deps.c
index 46efcbd..3d9f49a 100644
--- a/arch/x86/kernel/cpu/cpuid-deps.c
+++ b/arch/x86/kernel/cpu/cpuid-deps.c
@@ -79,6 +79,7 @@ static const struct cpuid_dep cpuid_deps[] = {
{ X86_FEATURE_SGX_LC, X86_FEATURE_SGX },
{ X86_FEATURE_SGX1, X86_FEATURE_SGX },
{ X86_FEATURE_SGX2, X86_FEATURE_SGX1 },
+ { X86_FEATURE_SGX_EUPDATESVN, X86_FEATURE_SGX1 },
{ X86_FEATURE_SGX_EDECCSSA, X86_FEATURE_SGX1 },
{ X86_FEATURE_XFD, X86_FEATURE_XSAVES },
{ X86_FEATURE_XFD, X86_FEATURE_XGETBV1 },
diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c
index caa4dc8..3785035 100644
--- a/arch/x86/kernel/cpu/scattered.c
+++ b/arch/x86/kernel/cpu/scattered.c
@@ -43,6 +43,7 @@ static const struct cpuid_bit cpuid_bits[] = {
{ X86_FEATURE_PER_THREAD_MBA, CPUID_ECX, 0, 0x00000010, 3 },
{ X86_FEATURE_SGX1, CPUID_EAX, 0, 0x00000012, 0 },
{ X86_FEATURE_SGX2, CPUID_EAX, 1, 0x00000012, 0 },
+ { X86_FEATURE_SGX_EUPDATESVN, CPUID_EAX, 10, 0x00000012, 0 },
{ X86_FEATURE_SGX_EDECCSSA, CPUID_EAX, 11, 0x00000012, 0 },
{ X86_FEATURE_HW_PSTATE, CPUID_EDX, 7, 0x80000007, 0 },
{ X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 },
next prev parent reply other threads:[~2025-10-16 21:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 13:11 [PATCH v17 0/5] Enable automatic SVN updates for SGX enclaves Elena Reshetova
2025-10-16 13:11 ` [PATCH v17 1/5] x86/sgx: Introduce functions to count the sgx_(vepc_)open() Elena Reshetova
2025-10-16 21:53 ` [tip: x86/sgx] " tip-bot2 for Elena Reshetova
2025-10-16 13:11 ` [PATCH v17 2/5] x86/cpufeatures: Add X86_FEATURE_SGX_EUPDATESVN feature flag Elena Reshetova
2025-10-16 21:53 ` tip-bot2 for Elena Reshetova [this message]
2025-10-16 13:11 ` [PATCH v17 3/5] x86/sgx: Define error codes for use by ENCLS[EUPDATESVN] Elena Reshetova
2025-10-16 21:53 ` [tip: x86/sgx] " tip-bot2 for Elena Reshetova
2025-10-16 13:11 ` [PATCH v17 4/5] x86/sgx: Implement ENCLS[EUPDATESVN] Elena Reshetova
2025-10-16 21:53 ` [tip: x86/sgx] " tip-bot2 for Elena Reshetova
2025-10-16 13:11 ` [PATCH v17 5/5] x86/sgx: Enable automatic SVN updates for SGX enclaves Elena Reshetova
2025-10-16 21:53 ` [tip: x86/sgx] " tip-bot2 for Elena Reshetova
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=176065159861.709179.13171067458385458125.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bondarn@google.com \
--cc=dave.hansen@linux.intel.com \
--cc=elena.reshetova@intel.com \
--cc=jarkko@kernel.org \
--cc=kai.huang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®