summaryrefslogtreecommitdiff
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorMichael Roth <michael.roth@amd.com>2022-02-24 19:56:11 +0300
committerBorislav Petkov <bp@suse.de>2022-04-07 17:47:11 +0300
commit801baa693c1f6d7327475c39100c456db340cd3e (patch)
treee6f60137e1595ee15e2cb73ab9d5fda95c504afa /arch/x86/boot
parentb66370db9a90b3fa4c4a1a732af3e7e38d6d4c7c (diff)
downloadlinux-801baa693c1f6d7327475c39100c456db340cd3e.tar.xz
x86/sev: Move MSR-based VMGEXITs for CPUID to helper
This code will also be used later for SEV-SNP-validated CPUID code in some cases, so move it to a common helper. While here, also add a check to terminate in cases where the CPUID function/subfunction is indexed and the subfunction is non-zero, since the GHCB MSR protocol does not support non-zero subfunctions. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Michael Roth <michael.roth@amd.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220307213356.2797205-32-brijesh.singh@amd.com
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/compressed/sev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c
index f31b434e2ce4..7a9cfbc43f4b 100644
--- a/arch/x86/boot/compressed/sev.c
+++ b/arch/x86/boot/compressed/sev.c
@@ -20,6 +20,7 @@
#include <asm/fpu/xcr.h>
#include <asm/ptrace.h>
#include <asm/svm.h>
+#include <asm/cpuid.h>
#include "error.h"
#include "../msr.h"