Documentation ¶
Overview ¶
- Guest Context (GCTX). - VM Save Area (VMSA). - Reverse Map Table (RMP). - Guest Physical Address (GPA).
Index ¶
- Constants
- type GCTX
- func (g *GCTX) LD() []byte
- func (g *GCTX) UpdateCpuidPage(gpa uint64) error
- func (g *GCTX) UpdateNormalPages(startGpa uint64, data []byte) error
- func (g *GCTX) UpdateSecretsPage(gpa uint64) error
- func (g *GCTX) UpdateVmsaPage(data []byte) error
- func (g *GCTX) UpdateZeroPages(gpa uint64, lengthBytes int) error
Constants ¶
const ( VMSA_GPA = 0xFFFFFFFFF000 LD_SIZE = sha512.Size384 PAGE_SIZE = 4096 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCTX ¶
type GCTX struct {
// contains filtered or unexported fields
}
GCTX represents a SNP Guest Context. VMSA page is recorded in the RMP table with GPA (u64)(-1). However, the address is page-aligned, and also all the bits above 51 are cleared.
func (*GCTX) UpdateCpuidPage ¶
UpdateSecretsPage extends the current launch digest with the hash of a page containing only zeros. Pagetype is set to 0x06.
func (*GCTX) UpdateNormalPages ¶
UpdateNormalPages extends the current launch digest with the hash of data. The hash is generated page by page. Pagetype is set to 0x01.
func (*GCTX) UpdateSecretsPage ¶
UpdateSecretsPage extends the current launch digest with the hash of a page containing only zeros. Pagetype is set to 0x05.