Skip to content

Commit 450605c

Browse files
Praveen Kumarliuw
authored andcommitted
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: 333abaf (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>
1 parent c6a8625 commit 450605c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/kernel/cpu/mshyperv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static void __init hv_smp_prepare_cpus(unsigned int max_cpus)
236236
for_each_present_cpu(i) {
237237
if (i == 0)
238238
continue;
239-
ret = hv_call_add_logical_proc(numa_cpu_node(i), i, cpu_physical_id(i));
239+
ret = hv_call_add_logical_proc(numa_cpu_node(i), i, i);
240240
BUG_ON(ret);
241241
}
242242

0 commit comments

Comments
 (0)