mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/sev: Per-node RMPOPT windows for >2TB systems
@ 2026-11-09 21:05 Ashish Kalra
  2026-11-09 21:05 ` [PATCH 1/2] x86/sev: Scan each core's own RMPOPT window Ashish Kalra
  2026-11-09 21:06 ` [PATCH 2/2] x86/sev: Add per-node RMPOPT windows for >2TB systems Ashish Kalra
  0 siblings, 2 replies; 3+ messages in thread
From: Ashish Kalra @ 2026-11-09 21:05 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen, x86, hpa, seanjc, peterz,
	thomas.lendacky, herbert, davem, ardb
  Cc: pbonzini, aik, Michael.Roth, KPrateek.Nayak, Tycho.Andersen,
	Nathan.Fontenot, ackerleytng, jackyli, pgonda, rientjes,
	jacobhxu, nikunj, linux-kernel, kvm, linux-coco

From: Ashish Kalra <ashish.kalra@amd.com>

RMPOPT_BASE is a per-core MSR whose optimization window covers at most 2 TB
of physical address space from its base.  The merged RMPOPT series programs
every core with the same base (start of RAM), so on a machine with more
than 2 TB of RAM only the first 2 TB is ever RMP-check-skipped; everything
above 2 TB pays full RMP checks for the life of the system.

This series extends the optimization across all of physical memory on >2 TB
systems by giving each NUMA node's cores a 2 TB window placed over that
node's own local memory.  A core overwhelmingly accesses its local node's
RAM, so spending each node's 2 TB budget on that memory puts the
optimization where the accesses land; whole-machine coverage is the union
of the per-node windows.  The <=2 TB case is unchanged: the window search
returns start-of-RAM for every node, so all cores share one window.

  Patch 1 generalizes the optimization scan to read each core's own
    RMPOPT_BASE (base and window size straight from the MSR) and walk only
    that window.  No behavioral change while every core shares one window.
  Patch 2 adds the per-node window selection and programming, and warms
    every window before the interrupts-disabled fan-out.

HW-validated on a ~3 TB 2-socket NPS2 box: every node optimizes its own
local memory and all populated memory is covered.

Ashish Kalra (2):
  x86/sev: Scan each core's own RMPOPT window
  x86/sev: Add per-node RMPOPT windows for >2TB systems

 arch/x86/include/asm/msr-index.h |   2 +
 arch/x86/virt/svm/sev.c          | 166 +++++++++++++++++++++++++++----
 2 files changed, 148 insertions(+), 20 deletions(-)


base-commit: 9f74092fda91ef93c2b07585785c1dc83cd7971f
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-09 21:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 21:05 [PATCH 0/2] x86/sev: Per-node RMPOPT windows for >2TB systems Ashish Kalra
2026-11-09 21:05 ` [PATCH 1/2] x86/sev: Scan each core's own RMPOPT window Ashish Kalra
2026-11-09 21:06 ` [PATCH 2/2] x86/sev: Add per-node RMPOPT windows for >2TB systems Ashish Kalra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®