x86/sev: Add a helper for the PVALIDATE instruction
authorBrijesh Singh <brijesh.singh@amd.com>
Wed, 9 Feb 2022 18:10:07 +0000 (12:10 -0600)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Apr 2022 11:10:30 +0000 (13:10 +0200)
commit0bd6f1e526070271dbe0f626b123b4f6b01dc79c
tree200b20241a403fc980ce96d8273fce2e5b145010
parentcbd3d4f7c4e5a93edae68e5142a269368fde77d6
x86/sev: Add a helper for the PVALIDATE instruction

An SNP-active guest uses the PVALIDATE instruction to validate or
rescind the validation of a guest page’s RMP entry. Upon completion, a
return code is stored in EAX and rFLAGS bits are set based on the return
code. If the instruction completed successfully, the carry flag (CF)
indicates if the content of the RMP were changed or not.

See AMD APM Volume 3 for additional details.

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-14-brijesh.singh@amd.com
arch/x86/include/asm/sev.h