SHA256
8
0
forked from pool/hwloc

1 Commits

Author SHA256 Message Date
dda6614b7b Sync changes to SLFO-1.2 branch 2025-08-20 09:25:45 +02:00
3 changed files with 31 additions and 98 deletions

View File

@@ -1,54 +0,0 @@
From 77495cecad7178ccd73ad4962780328f079a0e65 Mon Sep 17 00:00:00 2001
From: Brice Goglin <Brice.Goglin@inria.fr>
Date: Thu, 24 Apr 2025 09:08:08 +0200
Subject: [PATCH] x86: work around legacy_max_proc being 0 while HTT feature
bit is set
The Intel manual says that legacy_max_proc (CPUID.1.EBX[16-23]) is valid
if CPUID.1.EDX.HTT[bit 28] is set.
AMD (at least recent ones) don't say anything about it being invalid.
Unfortunately some Qemu config may keep the former at 0 with the latter set.
At least this happens when libvirt passes -cpu EPYC-Rome,ht=on to Qemu
(which sets the HTT bit), and -smp 32,maxcpus=48,sockets=48,cores=1,threads=1
says each CPU is single threaded (which keeps legacy_max_log_proc to 0).
This config comes from https://bugzilla.opensuse.org/show_bug.cgi?id=1236038
Calling flsl on this invalid mask leads to undefined behavior and some division
by zero later (depending on the compiler).
Check whether legacy_max_proc is 0 before using it.
If 0, assume legacy_max_log_proc is 1, just like we did when HTT is unset.
Thanks to Georg Pfuetzenreuter for the report
and Anthony Iliopoulos for the debugging.
Refs #714
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
---
hwloc/topology-x86.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hwloc/topology-x86.c b/hwloc/topology-x86.c
index a267ded49..5f63fc178 100644
--- a/hwloc/topology-x86.c
+++ b/hwloc/topology-x86.c
@@ -653,7 +653,13 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
cpuid_or_from_dump(&eax, &ebx, &ecx, &edx, src_cpuiddump);
infos->apicid = ebx >> 24;
if (edx & (1 << 28)) {
- legacy_max_log_proc = 1 << hwloc_flsl(((ebx >> 16) & 0xff) - 1);
+ unsigned ebx_16_23 = (ebx >> 16) & 0xff;
+ if (ebx_16_23) {
+ legacy_max_log_proc = 1 << hwloc_flsl(ebx_16_23 - 1);
+ } else {
+ hwloc_debug("HTT bit set in CPUID 0x01.edx, but legacy_max_proc = 0 in ebx, assuming legacy_max_log_proc = 1\n");
+ legacy_max_log_proc = 1;
+ }
} else {
hwloc_debug("HTT bit not set in CPUID 0x01.edx, assuming legacy_max_log_proc = 1\n");
legacy_max_log_proc = 1;
--
2.48.1

View File

@@ -1,12 +1,5 @@
-------------------------------------------------------------------
Mon Apr 28 07:32:19 UTC 2025 - Thomas Blume <Thomas.Blume@suse.com>
- fix division by zero exception with recent versions of GCC
(bsc#1236038)
* add 0001-x86-work-around-legacy_max_proc-being-0-while-HTT-fe.patch
-------------------------------------------------------------------
Tue Jan 7 08:56:48 UTC 2025 - Thomas Blume <Thomas.Blume@suse.com>
Thu Feb 13 16:25:01 UTC 2025 - Thomas Blume <thomas.blume@suse.com>
- update to 2.11.2 (jsc#PED-11875)
* Add missing CPU info attrs on aarch64 on Linux.
@@ -54,9 +47,6 @@ Tue Jan 7 08:56:48 UTC 2025 - Thomas Blume <Thomas.Blume@suse.com>
+ Add section "Compiling software on top of hwloc's C API" in the
documentation with examples for GNU Make and CMake.
-------------------------------------------------------------------
Wed Dec 27 19:01:59 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.10.0:
Heterogeneous Memory core improvements
+ Better heuristics to identify the subtype of memory such
@@ -210,8 +200,8 @@ Mon Jul 11 07:47:23 UTC 2022 - Dirk Müller <dmueller@suse.com>
thanks to --os-index-prefix and --logical-index-prefix options.
* Misc
+ Add --disable-readme to avoid regenerating the top-level hwloc README
file from the documentation.
* Bugfix
file from the documentation.
* Bugfix
+ Use setenv() instead of putenv() - fixes crash in Slurm (bsc#1210227)
-------------------------------------------------------------------
@@ -256,7 +246,7 @@ Fri Apr 8 16:42:15 UTC 2022 - Dirk Müller <dmueller@suse.com>
+ Windows CMake builds now support non-MSVC compilers, detect several
features at build time, can build/run tests, etc.
Thanks to Michael Hirsch and Alexander Neumann .
-------------------------------------------------------------------
Sun Dec 5 21:39:35 UTC 2021 - Dirk Müller <dmueller@suse.com>
@@ -297,7 +287,7 @@ Sun Dec 5 21:39:35 UTC 2021 - Dirk Müller <dmueller@suse.com>
-------------------------------------------------------------------
Sat Jul 17 13:13:07 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 2.5.0:
- update to 2.5.0:
+ Add hwloc/windows.h to query Windows processor groups.
+ Add hwloc_get_obj_with_same_locality() to convert between objects
with same locality, for instance NUMA nodes and Packages,
@@ -446,7 +436,7 @@ Tue Aug 18 15:37:56 UTC 2020 - Dirk Mueller <dmueller@suse.com>
+ Add a GRAPHICAL OUTPUT section in the manpage of lstopo.
* Misc
+ Use the native dlopen instead of libltdl,
unless --disable-plugin-dlopen is passed at configure time.
unless --disable-plugin-dlopen is passed at configure time.
- install systemd files using systemd macros and register it on install
with systemd
- build against libnuma on all architectures
@@ -619,9 +609,9 @@ Mon Mar 6 07:59:52 UTC 2017 - Thomas.Blume@suse.com
- make hwloc-dump-hwdata only available on x86, as it is only
supported for Intel Knights Landing Xeon Phi platforms
- revert sub packages for SLE from no-arch to arch specific in order
- revert sub packages for SLE from no-arch to arch specific in order
to keep backward compatibility
- fix typo in specfile
- fix typo in specfile
-------------------------------------------------------------------
Wed Feb 8 12:46:42 UTC 2017 - jengelh@inai.de
@@ -654,7 +644,7 @@ Mon Jan 23 14:37:16 UTC 2017 - tchvatal@suse.com
-------------------------------------------------------------------
Tue Jan 17 12:34:11 UTC 2017 - Thomas.Blume@suse.com
- switch to version 1.11.5 since 2.0 is a development version with
- switch to version 1.11.5 since 2.0 is a development version with
no .so-version set fate#321929 comment#5)
-------------------------------------------------------------------
@@ -751,41 +741,41 @@ Thu Mar 5 15:32:07 UTC 2015 - mpluskal@suse.com
- Cleanup spec file with spec-cleaner
- Update to 1.10.1
* Actually remove disallowed NUMA nodes from nodesets when the
* Actually remove disallowed NUMA nodes from nodesets when the
whole-system flag isn't enabled.
* Fix the gathering of PCI domains. Thanks to James Custer for
* Fix the gathering of PCI domains. Thanks to James Custer for
reporting the issue and providing a patch.
* Fix the merging of identical parent and child in presence of
* Fix the merging of identical parent and child in presence of
Misc objects. Thanks to Dave Love for reporting the issue.
* Fix some misordering of children when merging with
* Fix some misordering of children when merging with
ignore_keep_structure() in partially allowed topologies.
* Fix an overzealous assertion in the debug code when running
on a single-PU host with I/O. Thanks to Thomas Van Doren for
* Fix an overzealous assertion in the debug code when running
on a single-PU host with I/O. Thanks to Thomas Van Doren for
reporting the issue.
* Don't forget to setup NUMA node object nodesets in x86 backend
* Don't forget to setup NUMA node object nodesets in x86 backend
(for BSDs) and OSF/Tru64 backend.
* Fix cpuid-x86 build error with gcc -O3 on x86-32. Thanks to
* Fix cpuid-x86 build error with gcc -O3 on x86-32. Thanks to
Thomas Van Doren for reporting the issue.
* Fix support for future very large caches in the x86 backend.
* Fix vendor/device names for SR-IOV PCI devices on Linux.
* Fix an unlikely crash in case of buggy hierarchical distance matrix.
* Fix PU os_index on some AIX releases. Thanks to Hendryk
* Fix PU os_index on some AIX releases. Thanks to Hendryk
Bockelmann and Erik Schnetter for helping debugging.
* Fix hwloc_bitmap_isincluded() in case of infinite sets.
* Change hwloc-ls.desktop into a lstopo.desktop and only install
it if lstopo is built with Cairo/X11 support. It cannot work
* Change hwloc-ls.desktop into a lstopo.desktop and only install
it if lstopo is built with Cairo/X11 support. It cannot work
with a non-graphical lstopo or hwloc-ls.
* Add support for the renaming of Socket into Package in
* Add support for the renaming of Socket into Package in
future releases.
* Add support for the replacement of HWLOC_OBJ_NODE with
* Add support for the replacement of HWLOC_OBJ_NODE with
HWLOC_OBJ_NUMANODE in future releases.
* Clarify the documentation of distance matrices in hwloc.h and
in the manpage of the hwloc-distances. Thanks to Dave Love for
* Clarify the documentation of distance matrices in hwloc.h and
in the manpage of the hwloc-distances. Thanks to Dave Love for
the suggestion.
* Improve some error messages by displaying more information
* Improve some error messages by displaying more information
about the hwloc library in use.
* Document how to deal with the ABI break when upgrading to
the upcoming 2.0 See "How do I handle ABI breaks and API
* Document how to deal with the ABI break when upgrading to
the upcoming 2.0 See "How do I handle ABI breaks and API
upgrades ?" in the FAQ.
-------------------------------------------------------------------
@@ -854,14 +844,14 @@ Tue Dec 16 09:22:26 UTC 2014 - alinm.elena@gmail.com
+ Fix failures to detect X11/Xutil.h on some Solaris platforms.
Thanks to Siegmar Gross for reporting the failure.
+ The plugin ABI has changed, this release will not load plugins
built against previous hwloc releases.
built against previous hwloc releases.
-------------------------------------------------------------------
Sun Aug 17 18:42:36 UTC 2014 - mardnh@gmx.de
- removed patches (fixed upstream)
* hwloc-1.7-manpage.patch
* hwloc-1.7.patch
* hwloc-1.7.patch
- Update to Version 1.9.0
* API
@@ -1018,7 +1008,7 @@ Tue Nov 12 22:17:52 UTC 2013 - meissner@suse.com
-------------------------------------------------------------------
Wed Oct 16 08:02:12 UTC 2013 - boris@steki.net
- enable build on SLE and older (12.2) OS
- enable build on SLE and older (12.2) OS
-------------------------------------------------------------------
Fri Oct 4 12:34:25 UTC 2013 - mvyskocil@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package hwloc
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -35,8 +35,6 @@ Summary: Portable Hardware Locality
License: BSD-3-Clause
URL: https://www.open-mpi.org/projects/hwloc/
Source0: https://download.open-mpi.org/release/hwloc/v2.11/hwloc-%{version}.tar.bz2
Patch0: 0001-x86-work-around-legacy_max_proc-being-0-while-HTT-fe.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
@@ -139,7 +137,6 @@ HW accelerators from AMD and NVIDIA
%prep
%setup -q
%autopatch -p1
%build
autoreconf -fvi