Skip to contentSkip to conversation

tools/x86/kcpuid: Add AMD Secure Encryption leaf

PATCH Applied Borislav Petkov 3 participants 4 messages Mar 13, 2021 – Mar 15, 2021 x86 cpuid database

lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 tools/x86/kcpuid: Add AMD Secure Encryption leaf

From: Borislav Petkov <[email protected]>

Add the 0x8000001f leaf's fields.

---
 tools/arch/x86/kcpuid/cpuid.csv | 10 ++++++++++
 1 file changed, 10 insertions(+)
tools/arch/x86/kcpuid/cpuid.csv +10 -0
index f4a5b85073f4..7cb5c2189345 100644
@@ -378,3 +378,13 @@
 0x80000008,    0,  EAX,    7:0, phy_adr_bits, Physical Address Bits
 0x80000008,    0,  EAX,   15:8, lnr_adr_bits, Linear Address Bits
 0x80000007,    0,  EBX,      9, wbnoinvd, WBNOINVD
+
+# 8000001F: AMD Secure Encryption
+0x8000001F,	0, EAX, 0, SME,	Secure Memory Encryption
+0x8000001F,	0, EAX, 1, SEV,	Secure Encrypted Virtualization
+0x8000001F,	0, EAX, 2, VmPgFlush, VM Page Flush MSR
+0x8000001F,	0, EAX, 3, SevEs, SEV Encrypted State
+0x8000001F,	0, EBX, 5:0, C-Bit, Page table bit number used to enable memory encryption
+0x8000001F,	0, EBX, 11:6, MemEncryptPhysAddWidth, Reduction of physical address space in bits when SME is enabled
+0x8000001F,	0, ECX, 31:0, NumEncryptedGuests, Maximum ASID value that may be used for an SEV-enabled guest
+0x8000001F,	0, EDX, 31:0, MinimumSEVASID, Minimum ASID value that must be used for an SEV-enabled, SEV-ES-disabled guest
Signature · 1 line
2.29.2
author maintainer
#1 lore raw
Quoted 17 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

Add the 0x8000001f leaf's fields.

---
 tools/arch/x86/kcpuid/cpuid.csv | 10 ++++++++++
 1 file changed, 10 insertions(+)
tools/arch/x86/kcpuid/cpuid.csv +0 -0
index f4a5b85073f4..7cb5c2189345 100644
@@ -378,3 +378,13 @@
 0x80000008,    0,  EAX,    7:0, phy_adr_bits, Physical Address Bits
 0x80000008,    0,  EAX,   15:8, lnr_adr_bits, Linear Address Bits
 0x80000007,    0,  EBX,      9, wbnoinvd, WBNOINVD

tools/arch/x86/kcpuid/cpuid.csv line 390

Quoted 10 lines
tools/arch/x86/kcpuid/cpuid.csv +10 -0
+
+# 8000001F: AMD Secure Encryption
+0x8000001F,	0, EAX, 0, SME,	Secure Memory Encryption
+0x8000001F,	0, EAX, 1, SEV,	Secure Encrypted Virtualization
+0x8000001F,	0, EAX, 2, VmPgFlush, VM Page Flush MSR
+0x8000001F,	0, EAX, 3, SevEs, SEV Encrypted State
+0x8000001F,	0, EBX, 5:0, C-Bit, Page table bit number used to enable memory encryption
+0x8000001F,	0, EBX, 11:6, MemEncryptPhysAddWidth, Reduction of physical address space in bits when SME is enabled
+0x8000001F,	0, ECX, 31:0, NumEncryptedGuests, Maximum ASID value that may be used for an SEV-enabled guest
+0x8000001F,	0, EDX, 31:0, MinimumSEVASID, Minimum ASID value that must be used for an SEV-enabled, SEV-ES-disabled guest

Yeah, I guess we should keep the bit names in lowercase, for simplicity.

---
From: Borislav Petkov <[email protected]>
Date: Sat, 13 Mar 2021 14:56:16 +0100
Subject: [PATCH] tools/x86/kcpuid: Add AMD Secure Encryption leaf

Add the 0x8000001f leaf's fields.

---
 tools/arch/x86/kcpuid/cpuid.csv | 10 ++++++++++
 1 file changed, 10 insertions(+)
tools/arch/x86/kcpuid/cpuid.csv +10 -0
index f4a5b85073f4..dd94c07421a8 100644
@@ -378,3 +378,13 @@
 0x80000008,    0,  EAX,    7:0, phy_adr_bits, Physical Address Bits
 0x80000008,    0,  EAX,   15:8, lnr_adr_bits, Linear Address Bits
 0x80000007,    0,  EBX,      9, wbnoinvd, WBNOINVD
+
+# 8000001F: AMD Secure Encryption
+0x8000001F,	0, EAX, 0, sme,	Secure Memory Encryption
+0x8000001F,	0, EAX, 1, sev,	Secure Encrypted Virtualization
+0x8000001F,	0, EAX, 2, vmpgflush, VM Page Flush MSR
+0x8000001F,	0, EAX, 3, seves, SEV Encrypted State
+0x8000001F,	0, EBX, 5:0, c-bit, Page table bit number used to enable memory encryption
+0x8000001F,	0, EBX, 11:6, mem_encrypt_physaddr_width, Reduction of physical address space in bits with SME enabled
+0x8000001F,	0, ECX, 31:0, num_encrypted_guests, Maximum ASID value that may be used for an SEV-enabled guest
+0x8000001F,	0, EDX, 31:0, minimum_sev_asid, Minimum ASID value that must be used for an SEV-enabled, SEV-ES-disabled guest
Signature · 7 lines
2.29.2

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Acked-by
#2 lore raw
Quoted 4 lines · Borislav Petkov

On Sat, Mar 13, 2021 at 03:01:18PM +0100, Borislav Petkov wrote:

Yeah, I guess we should keep the bit names in lowercase, for simplicity.

Quoted 8 lines

---
From: Borislav Petkov <[email protected]>
Date: Sat, 13 Mar 2021 14:56:16 +0100
Subject: [PATCH] tools/x86/kcpuid: Add AMD Secure Encryption leaf

Add the 0x8000001f leaf's fields.

Thanks!

Quoted 30 lines
---
 tools/arch/x86/kcpuid/cpuid.csv | 10 ++++++++++
 1 file changed, 10 insertions(+)
tools/arch/x86/kcpuid/cpuid.csv +10 -0
index f4a5b85073f4..dd94c07421a8 100644
@@ -378,3 +378,13 @@
 0x80000008,    0,  EAX,    7:0, phy_adr_bits, Physical Address Bits
 0x80000008,    0,  EAX,   15:8, lnr_adr_bits, Linear Address Bits
 0x80000007,    0,  EBX,      9, wbnoinvd, WBNOINVD
+
+# 8000001F: AMD Secure Encryption
+0x8000001F,	0, EAX, 0, sme,	Secure Memory Encryption
+0x8000001F,	0, EAX, 1, sev,	Secure Encrypted Virtualization
+0x8000001F,	0, EAX, 2, vmpgflush, VM Page Flush MSR
+0x8000001F,	0, EAX, 3, seves, SEV Encrypted State
+0x8000001F,	0, EBX, 5:0, c-bit, Page table bit number used to enable memory encryption
+0x8000001F,	0, EBX, 11:6, mem_encrypt_physaddr_width, Reduction of physical address space in bits with SME enabled
+0x8000001F,	0, ECX, 31:0, num_encrypted_guests, Maximum ASID value that may be used for an SEV-enabled guest
+0x8000001F,	0, EDX, 31:0, minimum_sev_asid, Minimum ASID value that must be used for an SEV-enabled, SEV-ES-disabled guest
Signature · 7 lines
2.29.2

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#3 lore raw
In reply to Borislav Petkov
The following commit has been merged into the x86/misc branch of tip:

The following commit has been merged into the x86/misc branch of tip:

Commit-ID:     2d4177c01b4e7496c7d47b31865f8c85bffb3604
Gitweb:        https://git.kernel.org/tip/2d4177c01b4e7496c7d47b31865f8c85bffb3604
Author:        Borislav Petkov <[email protected]>
AuthorDate:    Sat, 13 Mar 2021 14:56:16 +01:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Mon, 15 Mar 2021 14:01:25 +01:00

tools/x86/kcpuid: Add AMD Secure Encryption leaf

Add the 0x8000001f leaf's fields.

---
 tools/arch/x86/kcpuid/cpuid.csv | 10 ++++++++++
 1 file changed, 10 insertions(+)
tools/arch/x86/kcpuid/cpuid.csv +10 -0
index f4a5b85..dd94c07 100644
@@ -378,3 +378,13 @@
 0x80000008,    0,  EAX,    7:0, phy_adr_bits, Physical Address Bits
 0x80000008,    0,  EAX,   15:8, lnr_adr_bits, Linear Address Bits
 0x80000007,    0,  EBX,      9, wbnoinvd, WBNOINVD
+
+# 8000001F: AMD Secure Encryption
+0x8000001F,	0, EAX, 0, sme,	Secure Memory Encryption
+0x8000001F,	0, EAX, 1, sev,	Secure Encrypted Virtualization
+0x8000001F,	0, EAX, 2, vmpgflush, VM Page Flush MSR
+0x8000001F,	0, EAX, 3, seves, SEV Encrypted State
+0x8000001F,	0, EBX, 5:0, c-bit, Page table bit number used to enable memory encryption
+0x8000001F,	0, EBX, 11:6, mem_encrypt_physaddr_width, Reduction of physical address space in bits with SME enabled
+0x8000001F,	0, ECX, 31:0, num_encrypted_guests, Maximum ASID value that may be used for an SEV-enabled guest
+0x8000001F,	0, EDX, 31:0, minimum_sev_asid, Minimum ASID value that must be used for an SEV-enabled, SEV-ES-disabled guest