For further enhancing the AMD EPYC virtualization experience on Linux, the upcoming Linux 6.14 looks like it will support Zen 5’s new RMPREAD instruction and segmented RMP mode as part of Secure Encrypted Virtualization Secure Nested Paging (SEV-SNP).
RMPREAD is a new instruction with Zen 5 processors for reading architectural-defined RMP (Reverse Map Table) entries. Using RMPREAD is the preferred method now for reading RMP table entries on supported (Zen 5 and future) processors while the non-architectural RMP format is still used on Zen 3 / Zen 4 processors with SEV-SNP.
The RMPREAD instruction documentation can be found via the AMD docs. The RMPREAD instruction and segmented RMP mode is described in the AMD patch set as:
“This series adds SEV-SNP support for a new instruction to read an RMP entry and for a segmented RMP table.
The RMPREAD instruction is used to return information related to an RMP entry in an architecturally defined format.
…
Segmented RMP support is a new way of representing the layout of an RMP table. Initial RMP table support required the RMP table to be contiguous in memory. RMP accesses from a NUMA node on which the RMP doesn’t reside can take longer than accesses from a NUMA node on which the RMP resides. Segmented RMP support allows the RMP entries to be located on the same node as the memory the RMP is covering, potentially reducing latency associated with accessing an RMP entry associated with the memory. Each RMP segment covers a specific range of system physical addresses.”
After going through six rounds of revisions the past several months, it looks like the upcoming Linux 6.14 kernel will land support for using RMPREAD and the segmented RMP mode for those using SEV-SNP with Linux virtualization on new AMD EPYC 9005 series.
In the past few days these RMPREAD and segmented RMP table patches have been picked up via the tip/tip.git’s x86/sev branch. With it making it now to a TIP branch weeks before the Linux 6.14 merge window opens in late January, these feature patches should be in the next kernel barring any last minute problems.