]> git.baikalelectronics.ru Git - kernel.git/commit
x86/sev: Define the Linux-specific guest termination reasons
authorBrijesh Singh <brijesh.singh@amd.com>
Wed, 9 Feb 2022 18:10:04 +0000 (12:10 -0600)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Apr 2022 11:02:41 +0000 (13:02 +0200)
commitef9ed7b4374c29950001f1e87a79bfb801eb6763
treedf594cefbfe1428235f461516e9ffbcbe0452a37
parentb7fd48b78ea82616033125b9bb19ec232e5c0ad7
x86/sev: Define the Linux-specific guest termination reasons

The GHCB specification defines the reason code for reason set 0. The
reason codes defined in the set 0 do not cover all possible causes for a
guest to request termination.

The reason sets 1 to 255 are reserved for the vendor-specific codes.
Reserve the reason set 1 for the Linux guest. Define the error codes for
reason set 1 so that one can have meaningful termination reasons and thus
better guest failure diagnosis.

While at it, change sev_es_terminate() to accept a reason set parameter.

  [ bp: Massage commit message. ]

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Venu Busireddy <venu.busireddy@oracle.com>
Link: https://lore.kernel.org/r/20220307213356.2797205-11-brijesh.singh@amd.com
arch/x86/boot/compressed/sev.c
arch/x86/include/asm/sev-common.h
arch/x86/kernel/sev-shared.c
arch/x86/kernel/sev.c