TianoCore EDK2 master
Loading...
Searching...
No Matches
AmdSvsmLib.h File Reference

Go to the source code of this file.

Functions

BOOLEAN EFIAPI AmdSvsmIsSvsmPresent (VOID)
 
UINT8 EFIAPI AmdSvsmSnpGetVmpl (VOID)
 
UINT64 EFIAPI AmdSvsmSnpGetCaa (VOID)
 
VOID EFIAPI AmdSvsmSnpPvalidate (IN SNP_PAGE_STATE_CHANGE_INFO *Info)
 
EFI_STATUS EFIAPI AmdSvsmSnpVmsaRmpAdjust (IN SEV_ES_SAVE_AREA *Vmsa, IN UINT32 ApicId, IN BOOLEAN SetVmsa)
 

Detailed Description

Public header file for the AmdSvsmLib.

This library class defines some routines used for invoking an SVSM when the guest is not running at VMPL0.

Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file AmdSvsmLib.h.

Function Documentation

◆ AmdSvsmIsSvsmPresent()

BOOLEAN EFIAPI AmdSvsmIsSvsmPresent ( VOID  )

Report the presence of an Secure Virtual Services Module (SVSM).

Determines the presence of an SVSM.

Return values
TRUEAn SVSM is present
FALSEAn SVSM is not present

Definition at line 130 of file AmdSvsmLib.c.

◆ AmdSvsmSnpGetCaa()

UINT64 EFIAPI AmdSvsmSnpGetCaa ( VOID  )

Report the Calling Area address (CAA) for the BSP of the SEV-SNP guest.

If an SVSM is present, the CAA for the BSP is returned.

Returns
The CAA

Definition at line 174 of file AmdSvsmLib.c.

◆ AmdSvsmSnpGetVmpl()

UINT8 EFIAPI AmdSvsmSnpGetVmpl ( VOID  )

Report the VMPL level at which the SEV-SNP guest is running.

Determines the VMPL level at which the guest is running. If an SVSM is not present, then it must be VMPL0, otherwise return what is reported by the SVSM.

Returns
The VMPL level

Definition at line 153 of file AmdSvsmLib.c.

◆ AmdSvsmSnpPvalidate()

VOID EFIAPI AmdSvsmSnpPvalidate ( IN SNP_PAGE_STATE_CHANGE_INFO Info)

Perform a PVALIDATE operation for the page ranges specified.

Validate or rescind the validation of the specified pages.

Parameters
[in]InfoPointer to a page state change structure

Definition at line 373 of file AmdSvsmLib.c.

◆ AmdSvsmSnpVmsaRmpAdjust()

EFI_STATUS EFIAPI AmdSvsmSnpVmsaRmpAdjust ( IN SEV_ES_SAVE_AREA Vmsa,
IN UINT32  ApicId,
IN BOOLEAN  SetVmsa 
)

Perform an RMPADJUST operation to alter the VMSA setting of a page.

Add or remove the VMSA attribute for a page.

Parameters
[in]VmsaPointer to an SEV-ES save area page
[in]ApicIdAPIC ID associated with the VMSA
[in]SetVmsaBoolean indicator as to whether to set or or clear the VMSA setting for the page
Return values
EFI_SUCCESSRMPADJUST operation successful
EFI_UNSUPPORTEDOperation is not supported
EFI_INVALID_PARAMETERRMPADJUST operation failed, an invalid parameter was supplied

Definition at line 492 of file AmdSvsmLib.c.