]> git.baikalelectronics.ru Git - kernel.git/commit
x86/hyperv: fix logical processor creation
authorPraveen Kumar <kumarpraveen@linux.microsoft.com>
Mon, 31 May 2021 07:40:46 +0000 (13:10 +0530)
committerWei Liu <wei.liu@kernel.org>
Wed, 2 Jun 2021 15:13:20 +0000 (15:13 +0000)
commit9d4701baf6f372a567f5e1c117d55e6580269008
treef0519d7221dcc656dac9e26242a50ce769b23676
parent6ff56fa8ac21e3d5c187795a61c45ac4ed7d06f8
x86/hyperv: fix logical processor creation

Microsoft Hypervisor expects the logical processor index to be the same
as CPU's index during logical processor creation. Using cpu_physical_id
confuses hypervisor's scheduler. That causes the root partition not boot
when core scheduler is used.

This patch removes the call to cpu_physical_id and uses the CPU index
directly for bringing up logical processor. This scheme works for both
classic scheduler and core scheduler.

Fixes: 95e0c4dd3b36 (x86/hyperv: implement and use hv_smp_prepare_cpus)
Signed-off-by: Praveen Kumar <kumarpraveen@linux.microsoft.com>
Link: https://lore.kernel.org/r/20210531074046.113452-1-kumarpraveen@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
arch/x86/kernel/cpu/mshyperv.c