mirror-linux/arch
Jork Loeser 5170a82e89 x86/hyperv: Skip LP/VP creation on kexec
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.

Co-developed-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>
Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>
Co-developed-by: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
Signed-off-by: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
Co-developed-by: Mukesh Rathor <mrathor@linux.microsoft.com>
Signed-off-by: Mukesh Rathor <mrathor@linux.microsoft.com>
Signed-off-by: Jork Loeser <jloeser@linux.microsoft.com>
Reviewed-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
2026-04-22 06:23:25 +00:00
..
alpha kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
arc kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
arm soc fixes for 7.0, part 2 2026-04-06 09:03:19 -07:00
arm64 soc fixes for 7.0, part 2 2026-04-06 09:03:19 -07:00
csky kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
hexagon kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
loongarch LoongArch: KVM: Fix base address calculation in kvm_eiointc_regs_access() 2026-03-26 14:29:09 +08:00
m68k kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
microblaze mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
mips Fix TLB uniquification for systems with TLB not initialised by firmware 2026-04-05 11:29:07 -07:00
nios2 kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
openrisc kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
parisc parisc: Flush correct cache in cacheflush() syscall 2026-03-15 09:28:49 +01:00
powerpc powerpc/powernv/iommu: iommu incorrectly bypass DMA APIs 2026-04-01 22:08:55 +05:30
riscv prctl: cfi: change the branch landing pad prctl()s to be more descriptive 2026-04-04 18:40:58 -06:00
s390 KVM: s390: vsie: Fix races with partial gmap invalidations 2026-04-07 18:20:58 +02:00
sh sh: platform_early: remove pdev->driver_override check 2026-03-17 20:30:57 +01:00
sparc Second round of Kbuild fixes for 7.0 2026-03-06 20:27:13 -08:00
um Second round of Kbuild fixes for 7.0 2026-03-06 20:27:13 -08:00
x86 x86/hyperv: Skip LP/VP creation on kexec 2026-04-22 06:23:25 +00:00
xtensa Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
.gitignore
Kconfig sched: Move clock related paravirt code to kernel/sched 2026-01-12 15:39:14 +01:00