TianoCore EDK2 master
Loading...
Searching...
No Matches
Svsm.h File Reference
#include <Base.h>
#include <Uefi.h>
#include <Library/BaseLib.h>

Go to the source code of this file.

Data Structures

union  SVSM_PVALIDATE_ENTRY
 
union  SVSM_REQUEST
 
union  SVSM_FUNCTION
 

Macros

#define SVSM_SUCCESS   0x00000000
 
#define SVSM_ERR_INCOMPLETE   0x80000000
 
#define SVSM_ERR_UNSUPPORTED_PROTOCOL   0x80000001
 
#define SVSM_ERR_UNSUPPORTED_CALL   0x80000002
 
#define SVSM_ERR_INVALID_ADDRESS   0x80000003
 
#define SVSM_ERR_INVALID_FORMAT   0x80000004
 
#define SVSM_ERR_INVALID_PARAMETER   0x80000005
 
#define SVSM_ERR_INVALID_REQUEST   0x80000006
 
#define SVSM_ERR_BUSY   0x80000007
 
#define SVSM_ERR_PVALIDATE_FAIL_INPUT   0x80001001
 
#define SVSM_ERR_PVALIDATE_FAIL_SIZE_MISMATCH   0x80001006
 
#define SVSM_ERR_PVALIDATE_FAIL_NO_CHANGE   0x80001010
 
#define SVSM_PVALIDATE_MAX_ENTRY    ((sizeof (((SVSM_CAA *)0)->SvsmBuffer) - sizeof (SVSM_PVALIDATE_HEADER)) / sizeof (SVSM_PVALIDATE_ENTRY))
 
#define SVSM_PROTOCOL_CORE   0
 
#define SVSM_PROTOCOL_ATTESTATION   1
 
#define SVSM_PROTOCOL_VTPM   2
 
#define SVSM_CORE_REMAP_CA   0
 
#define SVSM_CORE_PVALIDATE   1
 
#define SVSM_CORE_CREATE_VCPU   2
 
#define SVSM_CORE_DELETE_VCPU   3
 
#define SVSM_CORE_DEPOSIT_MEM   4
 
#define SVSM_CORE_WITHDRAW_MEM   5
 
#define SVSM_CORE_QUERY_PROTOCOL   6
 
#define SVSM_CORE_CONFIGURE_VTOM   7
 
#define SVSM_VTPM_QUERY   0
 
#define SVSM_VTPM_CMD   1
 

Typedefs

struct {
   UINT8   Reserved1 [320]
 
   UINT64   SvsmBase
 
   UINT64   SvsmSize
 
   UINT64   SvsmCaa
 
   UINT32   SvsmMaxVersion
 
   UINT8   SvsmGuestVmpl
 
   UINT8   Reserved2 [3]
 
SVSM_INFORMATION
 
struct {
   UINT8   SvsmCallPending
 
   UINT8   SvsmMemAvailable
 
   UINT8   Reserved1 [6]
 
   UINT8   SvsmBuffer [SIZE_4KB - 8]
 
SVSM_CAA
 
struct {
   UINT16   Entries
 
   UINT16   Next
 
   UINT8   Reserved [4]
 
SVSM_PVALIDATE_HEADER
 
struct {
   SVSM_PVALIDATE_HEADER   Header
 
   SVSM_PVALIDATE_ENTRY   Entry []
 
SVSM_PVALIDATE_REQUEST
 

Detailed Description

Secure VM Service Module (SVSM) Definition.

Provides data types allowing an SEV-SNP guest to interact with the SVSM.

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

Specification Reference:
Secure VM Service Module Specification

Definition in file Svsm.h.

Macro Definition Documentation

◆ SVSM_CORE_CONFIGURE_VTOM

#define SVSM_CORE_CONFIGURE_VTOM   7

Definition at line 117 of file Svsm.h.

◆ SVSM_CORE_CREATE_VCPU

#define SVSM_CORE_CREATE_VCPU   2

Definition at line 112 of file Svsm.h.

◆ SVSM_CORE_DELETE_VCPU

#define SVSM_CORE_DELETE_VCPU   3

Definition at line 113 of file Svsm.h.

◆ SVSM_CORE_DEPOSIT_MEM

#define SVSM_CORE_DEPOSIT_MEM   4

Definition at line 114 of file Svsm.h.

◆ SVSM_CORE_PVALIDATE

#define SVSM_CORE_PVALIDATE   1

Definition at line 111 of file Svsm.h.

◆ SVSM_CORE_QUERY_PROTOCOL

#define SVSM_CORE_QUERY_PROTOCOL   6

Definition at line 116 of file Svsm.h.

◆ SVSM_CORE_REMAP_CA

#define SVSM_CORE_REMAP_CA   0

SVSM Core Protocol calls

Definition at line 110 of file Svsm.h.

◆ SVSM_CORE_WITHDRAW_MEM

#define SVSM_CORE_WITHDRAW_MEM   5

Definition at line 115 of file Svsm.h.

◆ SVSM_ERR_BUSY

#define SVSM_ERR_BUSY   0x80000007

Definition at line 56 of file Svsm.h.

◆ SVSM_ERR_INCOMPLETE

#define SVSM_ERR_INCOMPLETE   0x80000000

Definition at line 49 of file Svsm.h.

◆ SVSM_ERR_INVALID_ADDRESS

#define SVSM_ERR_INVALID_ADDRESS   0x80000003

Definition at line 52 of file Svsm.h.

◆ SVSM_ERR_INVALID_FORMAT

#define SVSM_ERR_INVALID_FORMAT   0x80000004

Definition at line 53 of file Svsm.h.

◆ SVSM_ERR_INVALID_PARAMETER

#define SVSM_ERR_INVALID_PARAMETER   0x80000005

Definition at line 54 of file Svsm.h.

◆ SVSM_ERR_INVALID_REQUEST

#define SVSM_ERR_INVALID_REQUEST   0x80000006

Definition at line 55 of file Svsm.h.

◆ SVSM_ERR_PVALIDATE_FAIL_INPUT

#define SVSM_ERR_PVALIDATE_FAIL_INPUT   0x80001001

Definition at line 58 of file Svsm.h.

◆ SVSM_ERR_PVALIDATE_FAIL_NO_CHANGE

#define SVSM_ERR_PVALIDATE_FAIL_NO_CHANGE   0x80001010

Definition at line 60 of file Svsm.h.

◆ SVSM_ERR_PVALIDATE_FAIL_SIZE_MISMATCH

#define SVSM_ERR_PVALIDATE_FAIL_SIZE_MISMATCH   0x80001006

Definition at line 59 of file Svsm.h.

◆ SVSM_ERR_UNSUPPORTED_CALL

#define SVSM_ERR_UNSUPPORTED_CALL   0x80000002

Definition at line 51 of file Svsm.h.

◆ SVSM_ERR_UNSUPPORTED_PROTOCOL

#define SVSM_ERR_UNSUPPORTED_PROTOCOL   0x80000001

Definition at line 50 of file Svsm.h.

◆ SVSM_PROTOCOL_ATTESTATION

#define SVSM_PROTOCOL_ATTESTATION   1

Definition at line 104 of file Svsm.h.

◆ SVSM_PROTOCOL_CORE

#define SVSM_PROTOCOL_CORE   0

SVSM Guest Protocols

Definition at line 103 of file Svsm.h.

◆ SVSM_PROTOCOL_VTPM

#define SVSM_PROTOCOL_VTPM   2

Definition at line 105 of file Svsm.h.

◆ SVSM_PVALIDATE_MAX_ENTRY

#define SVSM_PVALIDATE_MAX_ENTRY    ((sizeof (((SVSM_CAA *)0)->SvsmBuffer) - sizeof (SVSM_PVALIDATE_HEADER)) / sizeof (SVSM_PVALIDATE_ENTRY))

Definition at line 85 of file Svsm.h.

◆ SVSM_SUCCESS

#define SVSM_SUCCESS   0x00000000

Definition at line 48 of file Svsm.h.

◆ SVSM_VTPM_CMD

#define SVSM_VTPM_CMD   1

Definition at line 123 of file Svsm.h.

◆ SVSM_VTPM_QUERY

#define SVSM_VTPM_QUERY   0

SVSM vTPM Protocol calls

Definition at line 122 of file Svsm.h.

Variable Documentation

◆ Entries

UINT16 Entries

Definition at line 63 of file Svsm.h.

◆ Entry

Definition at line 82 of file Svsm.h.

◆ Header

SVSM_PVALIDATE_HEADER Header

Definition at line 81 of file Svsm.h.

◆ Next

UINT16 Next

Definition at line 64 of file Svsm.h.

◆ Reserved

UINT8 Reserved[4]

Definition at line 66 of file Svsm.h.

◆ Reserved1

UINT8 Reserved1[6]

Definition at line 26 of file Svsm.h.

◆ Reserved2

UINT8 Reserved2[3]

Definition at line 33 of file Svsm.h.

◆ SvsmBase

UINT64 SvsmBase

Definition at line 28 of file Svsm.h.

◆ SvsmBuffer

UINT8 SvsmBuffer[SIZE_4KB - 8]

Definition at line 45 of file Svsm.h.

◆ SvsmCaa

UINT64 SvsmCaa

Definition at line 30 of file Svsm.h.

◆ SvsmCallPending

UINT8 SvsmCallPending

Definition at line 37 of file Svsm.h.

◆ SvsmGuestVmpl

UINT8 SvsmGuestVmpl

Definition at line 32 of file Svsm.h.

◆ SvsmMaxVersion

UINT32 SvsmMaxVersion

Definition at line 31 of file Svsm.h.

◆ SvsmMemAvailable

UINT8 SvsmMemAvailable

Definition at line 38 of file Svsm.h.

◆ SvsmSize

UINT64 SvsmSize

Definition at line 29 of file Svsm.h.