Patch "x86/xen: Calculate __max_logical_packages on PV domains" has been added to the 4.15-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
x86/xen: Calculate __max_logical_packages on PV domains
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-xen-calculate-__max_logical_packages-on-pv-domains.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
63e708f826bb21470155d37b103a75d8a9e25b18Mon Sep 17 00:00:00 2001
From: Prarit Bhargava <[email protected]>
Date: Wed, 7 Feb 2018 18:49:23 -0500
Subject: x86/xen: Calculate __max_logical_packages on PV domains
From: Prarit Bhargava <[email protected]>
commit 63e708f826bb21470155d37b103a75d8a9e25b18 upstream.
The kernel panics on PV domains because native_smp_cpus_done() is only called for HVM domains.
Calculate __max_logical_packages for PV domains.
--- arch/x86/include/asm/smp.h | 1 + arch/x86/kernel/smpboot.c | 10 ++++++++-- arch/x86/xen/smp.c | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-)
arch/x86/include/asm/smp.h +1 -0
@@ -129,6 +129,7 @@ static inline void arch_send_call_functivoid cpu_disable_common (void );void native_smp_prepare_boot_cpu (void );void native_smp_prepare_cpus (unsigned int max_cpus); +void calculate_max_logical_packages (void );void native_smp_cpus_done (unsigned int max_cpus);void common_cpu_up (unsigned int cpunum,struct task_struct *tidle);int native_cpu_up (unsigned int cpunum,struct task_struct *tidle);
arch/x86/kernel/smpboot.c +8 -2
@@ -1282,11 +1282,10 @@ void __init native_smp_prepare_boot_cpu(cpu_set_state_online (me); } -void __init native_smp_cpus_done (unsigned int max_cpus) +void __init calculate_max_logical_packages (void ) {int ncpus; -pr_debug ("Boot done\n" );/* * Today neither Intel nor AMD support heterogenous systems so * extrapolate the boot cpu's data to all packages.
@@ -1294,6 +1293,13 @@ void __init native_smp_cpus_done(unsigne ncpus =cpu_data (0 ).booted_cores *topology_max_smt_threads (); __max_logical_packages =DIV_ROUND_UP (nr_cpu_ids, ncpus);pr_info ("Max logical packages: %u\n" , __max_logical_packages); +} + +void __init native_smp_cpus_done (unsigned int max_cpus) +{ +pr_debug ("Boot done\n" ); + +calculate_max_logical_packages ();if (x86_has_numa_in_package)set_sched_topology (x86_numa_in_package_topology);
arch/x86/xen/smp.c +2 -0
@@ -122,6 +122,8 @@ void __init xen_smp_cpus_done(unsigned iif (xen_hvm_domain ())native_smp_cpus_done (max_cpus); +else +calculate_max_logical_packages ();if (xen_have_vcpu_info_placement)return ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/x86-xen-calculate-__max_logical_packages-on-pv-domains.patch