diff options
| author | Ashish Kalra <ashish.kalra@amd.com> | 2026-09-16 22:15:14 +0000 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2026-09-18 16:58:13 -0700 |
| commit | c6c6f156d192bf905eb6e46d8ad6229fa9bbe036 (patch) | |
| tree | d24dc68e41d781cff0165347d153c0700c1e1a67 /tools/perf/scripts/python/task-analyzer.py | |
| parent | 15d974be0a3ba37091083028d16237ff49eb05b5 (diff) | |
x86/sev: Perform RMP optimizations asynchronously
When SNP is enabled, all writes to memory are checked to ensure memory
integrity. This imposes performance overhead on the whole system.
RMPOPT is a new instruction that minimizes the performance overhead of
RMP checks on the hypervisor and on non-SNP guests by allowing such checks to
be skipped for 1GB regions of memory that are known not to contain any SNP
guest memory.
Add support for performing RMP optimizations asynchronously using a dedicated
per-CPU workqueue. Shortly after SNP initialization, run an optimization pass
over all physical memory.
As SNP guests are launched, RMPUPDATE assigns their private pages to
guest-owned state; when such a page falls within an optimized 1GB region, the
hardware clears that region's RMPOPT optimization and RMP checks resume there
to protect the guest memory.
Since launching SNP guests clears these optimizations, perform them again
asynchronously using the dedicated workqueue.
[ bp:
- Massage commit message and comments
- simplify code
- redo some of the logic ]
Suggested-by: Thomas Lendacky <thomas.lendacky@amd.com>
Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/daa513fbe8f0672b00bc5e026e4399244be6dc72.1789594774.git.ashish.kalra@amd.com
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
