2017-04-29 13:33 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0012818CentOS-7kernelpublic2017-02-24 22:29
ReporterMarcus Sundberg 
Platformi686OSOS Version
Product Version7.3.1611 
Target VersionFixed in Version 
Summary0012818: i386: Kernel panic on HPE DL360 Gen9 Haswell-EP when x2APIC is enabled.
DescriptionWhen running 3.10.0-514 and later 7.3.16 i686 kernels on HPE DL360 Gen9 with Haswell-EP CPU and the x2APIC firmware option enabled (the default from factory) the kernel will crash when initializing the uncore driver.
Additional InformationThe main issue is that x2APIC support is only available for x86_64, so the kernel cannot produce a proper mapping between physical and logical CPUs, and the uncore performance monitoring driver is heavily dependent on that mapping to exist (and be correct).
Attached Files
  • patch file icon x86-perf-uncore-Avoid-kernel-panic-on-missing-topolo.patch (1,550 bytes) 2017-02-14 16:20 -
    From ac68351410df683a149e7eea09df178884cf2419 Mon Sep 17 00:00:00 2001
    From: Marcus Sundberg <marcus.sundberg@aptilo.com>
    Date: Mon, 13 Feb 2017 22:57:11 +0100
    Subject: [PATCH] [x86] perf: uncore: Avoid kernel panic on missing topology
    The uncore code is heavily dependent on the CPU topology mapping code,
    so if we do not even have a working topology for the boot CPU we just
    give up.
    This happens for example on HPE DL360 Gen9 servers with x2APIC enabled
    in the firmware settings, where the kernel only finds a single core.
     arch/x86/events/intel/uncore.c | 14 ++++++++++++++
     1 file changed, 14 insertions(+)
    diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
    index 77ec6c0..88d79f6 100644
    --- a/arch/x86/events/intel/uncore.c
    +++ b/arch/x86/events/intel/uncore.c
    @@ -1394,6 +1394,20 @@ static int __init intel_uncore_init(void)
     	if (is_kdump_kernel())
     		return -ENODEV;
    +	/* Sanity check - do not even try to proceed if we have no
    +	   working topology mapping for the boot CPU. */
    +	if (rh_boot_cpu_data.logical_proc_id < 0 ||
    +	    topology_phys_to_logical_pkg(boot_cpu_data.phys_proc_id) < 0) {
    +		printk(KERN_ERR
    +		       "no mapping between physical and logical CPU, "
    +		       "boot CPU phys: %d, logical: %d/%d\n",
    +		       (int)boot_cpu_data.phys_proc_id,
    +		       (int)rh_boot_cpu_data.logical_proc_id,
    +		       (int)topology_phys_to_logical_pkg(
    +			       boot_cpu_data.phys_proc_id));
    +		return -ENODEV;
    +	}
     	max_packages = topology_max_packages();
     	pret = uncore_pci_init();




toracat (manager)

The patch will be applied to the next kernel update. Thanks.


toracat (manager)

kernel-plus-3.10.0-514.6.2.el7.centos.plus is out. It has the patch from this bug report.

-Issue History
Date Modified Username Field Change
2017-02-14 13:56 Marcus Sundberg New Issue
2017-02-14 13:56 Marcus Sundberg Tag Attached: i386
2017-02-14 16:20 Marcus Sundberg File Added: x86-perf-uncore-Avoid-kernel-panic-on-missing-topolo.patch
2017-02-14 16:50 toracat Status new => assigned
2017-02-14 16:50 toracat Note Added: 0028571
2017-02-23 16:46 toracat Note Added: 0028670
+Issue History