aboutsummaryrefslogtreecommitdiff
path: root/lib/pm-notifier-error-inject.c
diff options
context:
space:
mode:
authorBrijesh Singh <[email protected]>2024-01-25 22:11:18 -0600
committerBorislav Petkov (AMD) <[email protected]>2024-01-29 20:34:18 +0100
commita867ad6b340f47b7333b80a54b8507fc2cd80aa4 (patch)
tree5bc77f1a194c246da2ffb7741db37a474ade0c69 /lib/pm-notifier-error-inject.c
parent7364a6fbca45f826952ea932699fb2171d06ee73 (diff)
crypto: ccp: Handle legacy SEV commands when SNP is enabled
The behavior of legacy SEV commands is altered when the firmware is initialized for SNP support. In that case, all command buffer memory that may get written to by legacy SEV commands must be marked as firmware-owned in the RMP table prior to issuing the command. Additionally, when a command buffer contains a system physical address that points to additional buffers that firmware may write to, special handling is needed depending on whether: 1) the system physical address points to guest memory 2) the system physical address points to host memory To handle case #1, the pages of these buffers are changed to firmware-owned in the RMP table before issuing the command, and restored to hypervisor-owned after the command completes. For case #2, a bounce buffer is used instead of the original address. Signed-off-by: Brijesh Singh <[email protected]> Co-developed-by: Michael Roth <[email protected]> Signed-off-by: Michael Roth <[email protected]> Signed-off-by: Ashish Kalra <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions