Re: [PATCH v8 7/7] x86/sev: Add debugfs support for RMPOPT
From: Kalra, Ashish
Date: Thu Jun 18 2026 - 15:58:23 EST
On 6/18/2026 1:08 PM, Borislav Petkov wrote:
> On Mon, Jun 15, 2026 at 07:50:56PM +0000, Ashish Kalra wrote:
>> From: Ashish Kalra <ashish.kalra@xxxxxxx>
>>
>> Add a debugfs interface to report per-CPU RMPOPT status across all
>> system RAM.
>>
>> To dump the per-CPU RMPOPT status for all system RAM:
>>
>> /sys/kernel/debug/rmpopt# cat rmpopt-table
>>
>> Memory @ 0GB: CPU(s): none
>> Memory @ 1GB: CPU(s): none
>> Memory @ 2GB: CPU(s): 0-1023
>> Memory @ 3GB: CPU(s): 0-1023
>> Memory @ 4GB: CPU(s): none
>> Memory @ 5GB: CPU(s): 0-1023
>> Memory @ 6GB: CPU(s): 0-1023
>> Memory @ 7GB: CPU(s): 0-1023
>> ...
>> Memory @1025GB: CPU(s): 0-1023
>> Memory @1026GB: CPU(s): 0-1023
>> Memory @1027GB: CPU(s): 0-1023
>> Memory @1028GB: CPU(s): 0-1023
>> Memory @1029GB: CPU(s): 0-1023
>> Memory @1030GB: CPU(s): 0-1023
>> Memory @1031GB: CPU(s): 0-1023
>> Memory @1032GB: CPU(s): 0-1023
>> Memory @1033GB: CPU(s): 0-1023
>> Memory @1034GB: CPU(s): 0-1023
>> Memory @1035GB: CPU(s): 0-1023
>> Memory @1036GB: CPU(s): 0-1023
>> Memory @1037GB: CPU(s): 0-1023
>> Memory @1038GB: CPU(s): none
>>
>> Suggested-by: Thomas Lendacky <thomas.lendacky@xxxxxxx>
>> Signed-off-by: Ashish Kalra <ashish.kalra@xxxxxxx>
>> ---
>> arch/x86/virt/svm/sev.c | 128 ++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 128 insertions(+)
>
> https://lwn.net/Articles/309298/
>
Since the RMPOPT file is a diagnostic (verify the optimization took effect), debugfs is
arguably the right home for it and we are not claiming it to be an API (there is no
Documentation/ABI entry for it) and we are not presenting it as something tools should
depend on, it is a self-contained diagnostic/debug interface.
Maybe i can add a line to this patch's commit message stating it's a debug-only interface
with no stability guarantee.
We have to provide some method/interface for users to verify if RMP optimizations
are enabled for a GB range of memory.
Thanks,
Ashish