Thread (96 messages) 96 messages, 7 authors, 2021-11-11

Re: [PATCH v6 07/42] x86/sev: Add support for hypervisor feature VMGEXIT

From: Borislav Petkov <bp@alien8.de>
Date: 2021-10-13 14:02:38
Also in: kvm, linux-efi, linux-mm, lkml, platform-driver-x86
Subsystem: the rest, x86 architecture (32-bit and 64-bit) · Maintainers: Linus Torvalds, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen

On Fri, Oct 08, 2021 at 01:04:18PM -0500, Brijesh Singh wrote:
Version 2 of GHCB specification introduced advertisement of a features
that are supported by the hypervisor. Add support to query the HV
features on boot.

Version 2 of GHCB specification adds several new NAEs, most of them are
optional except the hypervisor feature. Now that hypervisor feature NAE
is implemented, so bump the GHCB maximum support protocol version.

Signed-off-by: Brijesh Singh <redacted>
---
 arch/x86/include/asm/sev-common.h |  3 +++
 arch/x86/include/asm/sev.h        |  2 +-
 arch/x86/include/uapi/asm/svm.h   |  2 ++
 arch/x86/kernel/sev-shared.c      | 30 ++++++++++++++++++++++++++++++
 4 files changed, 36 insertions(+), 1 deletion(-)
For the next version, when you add those variables, do this too pls:
diff --git a/arch/x86/kernel/sev-shared.c b/arch/x86/kernel/sev-shared.c
index 8ee27d07c1cd..7a2176e0d0ad 100644
--- a/arch/x86/kernel/sev-shared.c
+++ b/arch/x86/kernel/sev-shared.c
@@ -21,10 +21,10 @@
  *
  * GHCB protocol version negotiated with the hypervisor.
  */
-static u16 __ro_after_init ghcb_version;
+static u16 ghcb_version __ro_after_init;
 
 /* Bitmap of SEV features supported by the hypervisor */
-static u64 __ro_after_init sev_hv_features;
+static u64 sev_hv_features __ro_after_init;
 
 static bool __init sev_es_check_cpu_features(void)
 {
I didn't realize this earlier but we put that annotation at the end.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help