x86/sev: Add defines for GHCB version 2 MSR protocol requests
authorBrijesh Singh <brijesh.singh@amd.com>
Wed, 23 Jun 2021 06:40:00 +0000 (08:40 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 23 Jun 2021 09:25:17 +0000 (11:25 +0200)
commit310f134ed41fcaa03eff302b1e69f1ce1ee21841
tree285be487f4e031ded9d9ec790f6a24b1c60f2de8
parentbe1a5408868af341f61f93c191b5e346ee88c82a
x86/sev: Add defines for GHCB version 2 MSR protocol requests

Add the necessary defines for supporting the GHCB version 2 protocol.
This includes defines for:

- MSR-based AP hlt request/response
- Hypervisor Feature request/response

This is the bare minimum of requests that need to be supported by a GHCB
version 2 implementation. There are more requests in the specification,
but those depend on Secure Nested Paging support being available.

These defines are shared between SEV host and guest support.

  [ bp: Fold in https://lkml.kernel.org/r/20210622144825.27588-2-joro@8bytes.org too.
        Simplify the brewing macro maze into readability. ]

Co-developed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/YNLXQIZ5e1wjkshG@8bytes.org
arch/x86/include/asm/sev-common.h