OSDN Git Service

x86/sev: Move GHCB MSR protocol and NAE definitions in a common header
authorBrijesh Singh <brijesh.singh@amd.com>
Tue, 27 Apr 2021 11:16:35 +0000 (06:16 -0500)
committerBorislav Petkov <bp@suse.de>
Mon, 10 May 2021 05:46:39 +0000 (07:46 +0200)
commitb81fc74d53d1248de6db3136dd6b29e5d5528021
tree09dd0959cb65f9055e247341215880654fe5a514
parente759959fe3b8313c81d6200be44cb8a644d845ea
x86/sev: Move GHCB MSR protocol and NAE definitions in a common header

The guest and the hypervisor contain separate macros to get and set
the GHCB MSR protocol and NAE event fields. Consolidate the GHCB
protocol definitions and helper macros in one place.

Leave the supported protocol version define in separate files to keep
the guest and hypervisor flexibility to support different GHCB version
in the same release.

There is no functional change intended.

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Joerg Roedel <jroedel@suse.de>
Link: https://lkml.kernel.org/r/20210427111636.1207-3-brijesh.singh@amd.com
arch/x86/include/asm/sev-common.h [new file with mode: 0644]
arch/x86/include/asm/sev.h
arch/x86/kernel/sev-shared.c
arch/x86/kvm/svm/svm.h