Re: [PATCH v11 4/6] x86/sev: Add support to perform RMP optimizations asynchronously

"Kalra, Ashish" <[email protected]> Mon, 3 Aug 2026 14:37:59 -0500
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/3/2026 2:24 PM, Borislav Petkov wrote:
> Kalra, Ashish <[email protected]> wrote:
>> Followers are RMP-scan cache hits (cheap) and this only runs at setup/teardown
> 
> How?
> 
> I see the workqueue running periodically. And in talking about periodically, RMPOPT_WORK_TIMEOUT is not used anywhere.
> 
> What's up?

RMPOPT_WORK_TIMEOUT is used by snp_rmpopt_all_physmem() (mod_delayed_work()), which is added in the next patch — I'll
move the define there so each patch is self-contained. 

It isn't periodic either: the handler doesn't re-arm itself. The work runs at setup and re-init with queue_delayed_work(), 
and then per SNP-guest teardown via mod_delayed_work() (batched by the timeout) once the later patches wire that up.

Thanks,
Ashish