Hello Dave,
On 9/30/2024 6:25 PM, Dave Hansen wrote:
> On 9/30/24 16:11, Pavan Kumar Paluri wrote:
>> Provide "nosnp" boot option via "sev=nosnp" kernel command line to
>> prevent SEV-SNP[1] capable host kernel from enabling SEV-SNP and
>> initializing Reverse Map Table (RMP) [1].
>>
>> On providing sev=nosnp via kernel command line:
>> cat /sys/module/kvm_amd/parameters/sev_snp should be "N".
>
> I don't see any mention in the changelog, cover letter or Documentation/
> about why someone would want to do this.
>
> I assume it's because of performance (walking the RMP table is non-zero
> cost).
>
> The BIOS allocates the RMP table, right? So this option presumably gets
> the performance back, but not the memory. That's probably also worth
> mentioning ... somewhere.
Yes, that is correct. RMP is BIOS-allocated, so there is a performance
gain but not memory.
Besides, having a 'nosnp' command line option would benefit customers to
be able to set the BIOS option to allocate RMP, but not actually enable
it just yet. This way, they can avoid overhead incurred from RMP checks,
for when they do not want to run SEV-SNP guests.
I will include this information in the cover-letter.
Thanks,
Pavan