In an ordinary VM the host can read and change every byte of the guest.
A confidential VM (AMD calls its design SEV-SNP) keeps the host out: its
pages are encrypted with the VM's own key, and a table the host can
change only through instructions such as RMPUPDATE, never by writing it,
the Reverse Map Table (RMP), records who owns every page of RAM. A
guest address (GPA) still becomes a real one (SPA) through a table the
host owns (the CPU's nested page table; the IOMMU has its own, the
stage 2 of the virtual IOMMU page), but the
host is no longer trusted: the RMP is checked after it. Write a secret, then let the host try its luck.
Which experiment answers my question?
Each link opens the chapter's experiments; pick the named one from the menu
Platform assumption: the RMP states, fault bits and instructions come from AMD's SEV-SNP white paper and Linux, and can differ by CPU generation and kernel version.
Teaching model: the experiments use a small model with 16 or 32 bytes per page and a stand-in for ciphertext, not AES or AMD's RMP entry format.
Platform assumption: the Intel TDX and Arm CCA table only repeats Linux kernel documentation and is not modelled.
Experiments
Words used in the experiments
Host, hypervisor
The software that runs the VM. Here it is not trusted with the VM's data.
GPA, SPA
Guest-physical address (the VM's idea of RAM) and system-physical address (RAM in the usual case, a peer device's memory on a peer-to-peer path). The host's nested table maps one to the other.
ASID
The number that names a guest and selects its memory-encryption key. A is ASID 1, B is ASID 2.
RMP
Reverse Map Table: one entry per 4 KiB page of RAM saying who owns it, at which GPA, and whether the guest has validated it.
C-bit
A bit in the guest's own page table: 1 for a private (encrypted) access, 0 for a shared one.
RMPUPDATE, PVALIDATE, RMPADJUST
Instructions: the host assigns a page; the guest accepts it; a guest privilege level passes page permissions down.
VMPL, SVSM
Privilege levels inside one VM, 0 (most) to 3. A Secure VM Service Module often runs at VMPL0 and the guest kernel below it.
#PF, #NPF, #VC
A page fault (the host's, in the examples here, though one can also arise in guest execution), a nested page fault the host handles for the guest, and the guest's own VMM Communication exception.
VMSA, GHCB
The VM's saved registers (protected), and a page the guest shares to pass chosen values to the host.
Experiment
The latest access: which address, which record
Bytes at offsets 0x120 to 0x13f of A's page, as A reads them
Intel and Arm:
The RMP, scene by scene
Each scene runs the same teaching model as the experiments above, on
ordinary 4 KiB private pages with synthetic addresses. Every table is
the model's own record after your last action. Not modelled: large
pages, special pages, migration, and a real RMP entry layout.
What each side holds after that step
This "What if" step ran on its own copy; the panels show that copy.
The latest guest access, check by check
RMP · changed only by instructions; pages not listed are HYPERVISOR
Nested tables · the host edits them
RAM as the host reads it
What software read
Faults
The model keeps 16 or 32 bytes per page. Its "ciphertext" is a
stand-in that changes with the key and the address, not AES, and its
RMP lines are the white paper's fields, not AMD's packed entry.
Not modelled: 2 MiB RMP entries, the Immutable states other than
FIRMWARE, SNP guest messages and interrupts, execute checks,
and when permissions are first set: the 2020 white paper has the
guest's first PVALIDATE give VMPL0 full access and the others none,
as modelled here, but a newer APM revision (24593 rev 3.44,
§15.36.7) is reported to set initial permissions when the page is
assigned, so treat the exact instruction an experiment credits as
the white paper's, not the current manual's. Devices come next:
can a device reach private memory?
A page's life: the RMP states
The RMP is "a single data structure shared across the system that
contains one entry for every 4k page of DRAM that may be used by
VMs". Each entry puts its page in one of eight states. Instructions
move a page between the first three; the AMD Secure Processor
(AMD-SP, also called the ASP or PSP) owns the immutable ones.
State
What it means (white paper, Table 3)
HYPERVISOR
Default for unassigned memory: the host's own, non-SNP VMs' and shared (C=0) memory.
GUEST-INVALID
Assigned to a guest, not yet usable: the guest has not validated it.
GUEST-VALID
Assigned and usable as the guest's private (C=1) memory.
PRE-GUEST, PRE-SWAP
Immutable; PRE-GUEST not validated, PRE-SWAP validated.
FIRMWARE, METADATA, CONTEXT
Immutable pages the AMD-SP uses for itself, for swap metadata and for per-VM data.
One read, all the way
Guest A reads GVA 0x4000_0120 (the study notes' E09):
Guest page table (the guest's): GVA → GPA 0x0020_0120.
Nested table (the host's): GPA → SPA 0x8000_0120; the offset 0x120 survives both.
RMP entry for SPA page 0x8000_0000: owner A, GPA page 0x0020_0000, validated, 4 KiB, VMPL0 may read. Every check passes.
RAM: the memory controller decrypts with A's key. A sees its plaintext.
The RMP is not another translation step: it does not change the
address, it decides whether the one the tables produced may be used.
Two guest virtual addresses that reach the same GPA are fine (E11);
two GPAs that try to use the same private page are not, because the
RMP entry names exactly one GPA.
Which fault is which
You see
Who gets it
Here it means
#PF (RMP)
the host
The host wrote a page the RMP gives to a guest or the AMD-SP.
#NPF, RMP bit (31)
the host, for the guest
The page's owner or GPA does not match the access, or the C-bit does not match the page's state. Linux names the bits PFERR_GUEST_RMP_MASK and, for a C=1 access, PFERR_GUEST_ENC_MASK (34).
#NPF, VMPL bit (36)
the host, for the guest
This VMPL lacks the permission (PFERR_GUEST_VMPL_MASK).
#VC
the guest
The page is assigned but not validated. Also raised for instructions the host would intercept (CPUID, MSR and I/O accesses); the #VC handler then asks the host through the GHCB. So it is not an error in general.
RMP_PAGE_FAULT
the IOMMU's event log
A device's access failed the RMP check: see secure DMA.
A rejected length
guest software
A protocol check (E08, E16). Not a hardware fault at all.
SME, SEV, SEV-ES and SNP: what each adds
Name
Protects
Does not by itself give
SME, TSME
What DRAM holds: memory encrypted with a host key (TSME without the OS choosing pages).
Any protection from the host's own software.
SEV
A VM's memory, with its own key.
Protection from a host that remaps or rewrites pages.
SEV-ES
The VM's saved registers (VMSA) across exits.
Integrity of the rest of RAM.
SEV-SNP
Integrity too: the RMP, validation, VMPLs, attestation.
Two names often merged: a memory-encryption key (SME-MK on
AMD, MKTME on Intel) chooses how memory is encrypted, while a
protection key (MPK, PKU) only switches access rights; it
encrypts nothing (E05). And two host keys do not make two confidential
VMs: ownership, validation and evidence are separate records (E04).
Intel TDX and Arm CCA
The same questions, other designs. This guide describes them only as
far as the sources below say; it has no model of either.
AMD SEV-SNP
Intel TDX
Arm CCA
Protected VM
SNP guest
Trust domain (TD)
Realm
Trusted manager
AMD-SP firmware
The TDX module, "a CPU-attested software module"
The Realm Management Monitor (RMM)
Private or shared
C-bit and RMP state
"a bit in its page table entries"
Protected lower half of the IPA space, shared upper half
Accepting memory
PVALIDATE
Private pages must be accepted before use; premature access causes a #VE or a TD exit according to configuration (Linux normally disables these private-memory #VEs)