mirror-linux/arch/x86
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
..
boot Miscellaneous x86 fixes: 2026-03-07 17:12:06 -08:00
coco x86/fred: Fix early boot failures on SEV-ES/SNP guests 2026-03-23 14:18:18 +01:00
configs
crypto crypto: x86/aes-gcm - Use new AES library API 2026-01-15 14:09:08 -08:00
entry x86/fred: Fix early boot failures on SEV-ES/SNP guests 2026-03-23 14:18:18 +01:00
events perf/x86/intel/uncore: Remove extra double quote mark 2026-04-07 09:05:30 +02:00
hyperv x86/hyperv: Use any general-purpose register when saving %cr2 and %cr8 2026-03-12 04:25:20 +00:00
ia32
include KVM x86 fixes for 7.1 2026-04-11 14:10:44 +02:00
kernel x86/hyperv: Skip LP/VP creation on kexec 2026-04-22 06:23:25 +00:00
kvm KVM: x86/mmu: Only WARN in direct MMUs when overwriting shadow-present SPTE 2026-03-27 22:33:33 +01:00
lib mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
math-emu x86/math-emu: Fix div_Xsig() prototype 2025-11-09 21:01:08 +01:00
mm x86/kexec: Disable KCOV instrumentation after load_segments() 2026-03-30 14:15:25 +02:00
net x86/cfi: Fix CFI rewrite for odd alignments 2026-02-23 11:19:11 +01:00
pci Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
platform x86/platform/geode: Fix on-stack property data use-after-return bug 2026-03-31 09:55:26 +02:00
power Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
purgatory kcfi: Rename CONFIG_CFI_CLANG to CONFIG_CFI 2025-09-24 14:29:14 -07:00
ras
realmode
tools x86/entry/vdso: Add vdso2c to .gitignore 2026-01-27 23:27:51 +01:00
um arch: um/x86: Select ARCH_SUPPORTS_ATOMIC_RMW for UML_X86 2026-01-09 19:01:41 +08:00
video sysfb: Replace screen_info with sysfb_primary_display 2025-12-16 14:12:44 +01:00
virt Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xen xen: branch for v7.0-rc3 2026-03-07 07:44:32 -08:00
.gitignore
Kbuild
Kconfig mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
Kconfig.assembler
Kconfig.cpu
Kconfig.cpufeatures * VDSO rework and cleanups 2026-02-10 19:34:26 -08:00
Kconfig.debug
Makefile x86/entry/vdso: Update the object paths for "make vdso_install" 2026-01-16 12:58:45 -08:00
Makefile.um
Makefile_32.cpu x86/cpu: Drop unused Kconfig symbol X86_P6_NOP 2026-01-06 08:57:23 -08:00