]> git.baikalelectronics.ru Git - kernel.git/commit
x86/sev: Move MSR-based VMGEXITs for CPUID to helper
authorMichael Roth <michael.roth@amd.com>
Thu, 24 Feb 2022 16:56:11 +0000 (10:56 -0600)
committerBorislav Petkov <bp@suse.de>
Thu, 7 Apr 2022 14:47:11 +0000 (16:47 +0200)
commitac2949cafa6db29d285dc2479379b756de501bd0
treee6f60137e1595ee15e2cb73ab9d5fda95c504afa
parentfed99d5605fcce3d4fdfebd452366e81cb7fe753
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
arch/x86/boot/compressed/sev.c
arch/x86/kernel/sev-shared.c
arch/x86/kernel/sev.c