x86/hyperv: LP creation with lp_index on same CPU-id
Subsystems (3)
PATCH 1/1 x86/hyperv: LP creation with lp_index on same CPU-id
The hypervisor expects the lp_index to be same as cpu-id during LP creation This fix correct the same, as cpu_physical_id can give different cpu-id.
--- arch/x86/kernel/cpu/mshyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/mshyperv.c +1 -1
@@ -236,7 +236,7 @@ static void __init hv_smp_prepare_cpus(unsigned int max_cpus)for_each_present_cpu (i) {if (i ==0 )continue ; - ret =hv_call_add_logical_proc (numa_cpu_node (i), i,cpu_physical_id (i)); + ret =hv_call_add_logical_proc (numa_cpu_node (i), i, i);BUG_ON (ret); }
Signature · 1 line
2.25.1
Wei Liu
maintainerQuoted 2 lines · Praveen Kumar
The hypervisor expects the
lp_indexto be same as cpu-id during LP creation This fix correct the same, ascpu_physical_idcan give different cpu-id.
Code looks fine to me, but the commit message can be made clearer.
"""
The hypervisor expects the logical processor index to be the same as CPU's id during logical processor creation. Using cpu_physical_id confuses Microsoft 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.
"""
No action is required from you. If you are fine with this commit message I can incorporate it and update the subject line when committing this patch.
Quoted 22 lines
Signed-off-by Praveen Kumar <[email protected]>--- arch/x86/kernel/cpu/mshyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/cpu/mshyperv.c +1
-1@@ -236,7 +236,7 @@ static void __init hv_smp_prepare_cpus(unsigned int max_cpus)for_each_present_cpu (i) {if (i ==0 )continue ; - ret =hv_call_add_logical_proc (numa_cpu_node (i), i,cpu_physical_id (i)); + ret =hv_call_add_logical_proc (numa_cpu_node (i), i, i);BUG_ON (ret); }Signature · 1 line
2.25.1
Quoted 16 lines · Wei Liu
Quoted 2 lines · Praveen Kumar
The hypervisor expects the
lp_indexto be same as cpu-id during LP creation This fix correct the same, ascpu_physical_idcan give different cpu-id.Code looks fine to me, but the commit message can be made clearer.
"""
The hypervisor expects the logical processor index to be the same as CPU's id during logical processor creation. Usingcpu_physical_idconfuses Microsoft Hypervisor's scheduler. That causes the root partition not boot when core scheduler is used.This patch removes the call to
cpu_physical_idand uses the CPU index directly for bringing up logical processor. This scheme works for both classic scheduler and core scheduler.
Quoted 7 lines
Fixes 333abaf5abb3 (x86/hyperv: implement and use hv_smp_prepare_cpus)"""
No action is required from you. If you are fine with this commit message I can incorporate it and update the subject line when committing this patch.
Thanks Wei for your comments. I'm fine with your inputs. Please go ahead. Thanks.
Regards,
~Praveen.
Quoted 22 lines
Quoted 22 lines
Signed-off-by Praveen Kumar <[email protected]>--- arch/x86/kernel/cpu/mshyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/cpu/mshyperv.c +1
-1@@ -236,7 +236,7 @@ static void __init hv_smp_prepare_cpus(unsigned int max_cpus)for_each_present_cpu (i) {if (i ==0 )continue ; - ret =hv_call_add_logical_proc (numa_cpu_node (i), i,cpu_physical_id (i)); + ret =hv_call_add_logical_proc (numa_cpu_node (i), i, i);BUG_ON (ret); }Signature · 1 line
2.25.1
Quoted 22 lines · Praveen Kumar
Quoted 19 lines · Wei Liu
Quoted 2 lines · Praveen Kumar
The hypervisor expects the
lp_indexto be same as cpu-id during LP creation This fix correct the same, ascpu_physical_idcan give different cpu-id.Code looks fine to me, but the commit message can be made clearer.
"""
The hypervisor expects the logical processor index to be the same as CPU's id during logical processor creation. Usingcpu_physical_idconfuses Microsoft Hypervisor's scheduler. That causes the root partition not boot when core scheduler is used.This patch removes the call to
cpu_physical_idand 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)"""
Quoted 6 lines
Quoted 4 lines
No action is required from you. If you are fine with this commit message I can incorporate it and update the subject line when committing this patch.
Thanks Wei for your comments. I'm fine with your inputs. Please go ahead. Thanks.
Pushed to hyperv-next. Thanks.