On Mon, May 04, 2026 at 03:09:21PM +0000, Michael Kelley wrote: > From: Jork Loeser <[email protected]> Sent: Tuesday, April 7, 2026 > 6:37 PM > > > > After a kexec the logical processors and virtual processors already > > exist in the hypervisor because they were created by the previous > > kernel. Attempting to add them again causes either a BUG_ON or > > corrupted VP state leading to MCEs in the new kernel. > > > > Add hv_lp_exists() to probe whether an LP is already present by > > calling HVCALL_GET_LOGICAL_PROCESSOR_RUN_TIME. When it succeeds the > > LP exists and we skip the add-LP and create-VP loops entirely. > > > > Also add hv_call_notify_all_processors_started() which informs the > > hypervisor that all processors are online. This is required after > > adding LPs (fresh boot) and is a no-op on kexec since we skip that > > path. > > Adding hv_call_notify_all_processors_started() seems like it should be > a separate patch. And this paragraph in the commit message leaves me > with questions: Is it really "required"? If it is, how does the existing > upstream code ever work? Does the change need to be backported > to stable kernels? If it isn't *really* required, what are the implications > of not doing it?
It is complicated. If I remember correctly, we realized this call was absolutely needed if SEV-SNP host side support is enabled. If that support is not enabled, then things continue to work. I think it is the right thing to do to always make this call. We don't need to backport this yet. Wei

