]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:59:40 +0000 (16:59 +0200)
commita31f9aa6858bf5ffd264fb89230f7ea7a4492ff5
tree1992e8996ad0cc97cd8e84a8a53d6ae7ed9c9b28
parent08a97ba2b316fef23101282f3e9b11af81f77559
x86/hyperv: fix logical processor creation

[ Upstream commit 450605c28d571eddca39a65fdbc1338add44c6d9 ]

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: 333abaf5abb3 (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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/cpu/mshyperv.c