Skip to content

Commit 8c92369

Browse files
authored
Upgrade: intel-cmt-cat version to 24.05 (#11001)
1 parent 315b6c7 commit 8c92369

6 files changed

Lines changed: 214 additions & 136 deletions
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Description: Workaround environment variable settings
2+
Add environment to be set by packaging
3+
Forwarded: not-needed
4+
Author: Colin Ian King <colin.i.king@gmail.com>
5+
6+
Index: intel-cmt-cat-24.05/lib/Makefile
7+
===================================================================
8+
--- intel-cmt-cat-24.05.orig/lib/Makefile
9+
+++ intel-cmt-cat-24.05/lib/Makefile
10+
@@ -121,10 +121,10 @@ endif
11+
12+
HDR = pqos.h
13+
PREFIX ?= /usr/local
14+
-LIB_INSTALL_DIR ?= $(PREFIX)/lib
15+
-HDR_DIR ?= $(PREFIX)/include
16+
+LIB_INSTALL_DIR ?= $(DESTDIR)/usr/lib64
17+
+HDR_DIR ?= $(DESTDIR)/usr/include
18+
DEPFILE = $(LIB).dep
19+
-NOLDCONFIG ?= n
20+
+NOLDCONFIG ?= y
21+
22+
all: $(LIBNAME)
23+
24+
Index: intel-cmt-cat-24.05/pqos/Makefile
25+
===================================================================
26+
--- intel-cmt-cat-24.05.orig/pqos/Makefile
27+
+++ intel-cmt-cat-24.05/pqos/Makefile
28+
@@ -96,8 +96,8 @@ MAN = pqos.8
29+
30+
# XXX: modify as desired
31+
PREFIX ?= /usr/local
32+
-BIN_DIR = $(PREFIX)/bin
33+
-MAN_DIR = $(PREFIX)/man/man8
34+
+BIN_DIR = $(DESTDIR)/usr/sbin
35+
+MAN_DIR = $(DESTDIR)/usr/share/man/man8
36+
37+
SRCS = $(sort $(wildcard *.c))
38+
OBJS = $(addprefix $(OBJDIR)/,$(SRCS:.c=.o))
39+
Index: intel-cmt-cat-24.05/rdtset/Makefile
40+
===================================================================
41+
--- intel-cmt-cat-24.05.orig/rdtset/Makefile
42+
+++ intel-cmt-cat-24.05/rdtset/Makefile
43+
@@ -97,8 +97,8 @@ MAN = rdtset.8
44+
45+
# XXX: modify as desired
46+
PREFIX ?= /usr/local
47+
-BIN_DIR = $(PREFIX)/bin
48+
-MAN_DIR = $(PREFIX)/man/man8
49+
+BIN_DIR = $(DESTDIR)/usr/sbin
50+
+MAN_DIR = $(DESTDIR)/usr/share/man/man8
51+
52+
SRCS = $(sort $(wildcard *.c))
53+
OBJS = $(SRCS:.c=.o)
54+
Index: intel-cmt-cat-24.05/tools/membw/Makefile
55+
===================================================================
56+
--- intel-cmt-cat-24.05.orig/tools/membw/Makefile
57+
+++ intel-cmt-cat-24.05/tools/membw/Makefile
58+
@@ -41,8 +41,8 @@ MAN = membw.8
59+
60+
# XXX: modify as desired
61+
PREFIX ?= /usr/local
62+
-BIN_DIR = $(PREFIX)/bin
63+
-MAN_DIR = $(PREFIX)/man/man8
64+
+BIN_DIR = $(DESTDIR)/usr/bin
65+
+MAN_DIR = $(DESTDIR)/usr/share/man/man8
66+
67+
CFLAGS=-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
68+
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Description: Remove examples
2+
No need to install these, developers are encouraged to look
3+
at the code in the repository
4+
Forwarded: not-needed
5+
Author: Colin Ian King <colin.i.king@gmail.com>
6+
7+
Index: intel-cmt-cat-24.05/Makefile
8+
===================================================================
9+
--- intel-cmt-cat-24.05.orig/Makefile
10+
+++ intel-cmt-cat-24.05/Makefile
11+
@@ -55,9 +55,6 @@ all:
12+
$(MAKE) -C pqos
13+
$(MAKE) -C rdtset
14+
$(MAKE) -C tools/membw
15+
- $(MAKE) -C examples/c/CAT_MBA
16+
- $(MAKE) -C examples/c/CMT_MBM
17+
- $(MAKE) -C examples/c/PSEUDO_LOCK
18+
19+
setup-dev:
20+
$(MAKE) -C appqos setup-dev
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
Description: Hard code in hardening options
2+
Forwarded: not-needed
3+
Author: Colin Ian King <colin.i.king@gmail.com>
4+
5+
Index: intel-cmt-cat-24.05/lib/Makefile
6+
===================================================================
7+
--- intel-cmt-cat-24.05.orig/lib/Makefile
8+
+++ intel-cmt-cat-24.05/lib/Makefile
9+
@@ -39,8 +39,8 @@ LIB = libpqos
10+
VERSION = 6.0.0
11+
SO_VERSION = 6
12+
SHARED ?= y
13+
-LDFLAGS = -L. -lpthread -z noexecstack -z relro -z now
14+
-CFLAGS = -pthread -I./ -D_GNU_SOURCE \
15+
+LDFLAGS += -L. -lpthread -z noexecstack -z relro -z now
16+
+CFLAGS += -pthread -I./ -D_GNU_SOURCE \
17+
-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
18+
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
19+
-Wcast-qual -Wundef -Wwrite-strings \
20+
Index: intel-cmt-cat-24.05/pqos/Makefile
21+
===================================================================
22+
--- intel-cmt-cat-24.05.orig/pqos/Makefile
23+
+++ intel-cmt-cat-24.05/pqos/Makefile
24+
@@ -38,9 +38,9 @@ include ../pre-build.mk
25+
26+
OBJDIR = obj
27+
LIBDIR ?= ../lib
28+
-LDFLAGS = -L$(LIBDIR) -pie -z noexecstack -z relro -z now
29+
+LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now
30+
LDLIBS = -lpqos -lpthread
31+
-CFLAGS = -I$(LIBDIR) \
32+
+CFLAGS += -I$(LIBDIR) \
33+
-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
34+
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
35+
-Wcast-qual -Wundef -Wwrite-strings \
36+
Index: intel-cmt-cat-24.05/rdtset/Makefile
37+
===================================================================
38+
--- intel-cmt-cat-24.05.orig/rdtset/Makefile
39+
+++ intel-cmt-cat-24.05/rdtset/Makefile
40+
@@ -37,9 +37,9 @@
41+
include ../pre-build.mk
42+
43+
LIBDIR ?= ../lib
44+
-LDFLAGS = -L$(LIBDIR) -pie -z noexecstack -z relro -z now
45+
+LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now
46+
LDLIBS = -lpqos -lpthread
47+
-CFLAGS = -I$(LIBDIR) \
48+
+CFLAGS += -I$(LIBDIR) \
49+
-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
50+
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
51+
-Wcast-qual -Wundef -Wwrite-strings \
52+
Index: intel-cmt-cat-24.05/tools/membw/Makefile
53+
===================================================================
54+
--- intel-cmt-cat-24.05.orig/tools/membw/Makefile
55+
+++ intel-cmt-cat-24.05/tools/membw/Makefile
56+
@@ -44,7 +44,7 @@ PREFIX ?= /usr/local
57+
BIN_DIR = $(DESTDIR)/usr/bin
58+
MAN_DIR = $(DESTDIR)/usr/share/man/man8
59+
60+
-CFLAGS=-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
61+
+CFLAGS += -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
62+
-Wmissing-declarations -Wold-style-definition -Wpointer-arith \
63+
-Wcast-qual -Wundef -Wwrite-strings \
64+
-Wformat -Wformat-security -fstack-protector-strong -fPIE \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"intel-cmt-cat-4.1.0.tar.gz": "d2f4a45b9fa13efe231f0b510049929efad4888d7dd6371fe9d52759cb0d7bdc"
3+
"intel-cmt-cat-24.05.tar.gz": "5ed6c712f967f10e4160da72a0e4880caad29795f99c9ae1ce9d5832939705f0"
44
}
55
}

SPECS-EXTENDED/intel-cmt-cat/intel-cmt-cat.spec

Lines changed: 59 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -25,152 +25,78 @@ Distribution: Azure Linux
2525
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
%global githubname intel-cmt-cat
29-
%global githubver 4.1.0
30-
31-
%if %{defined githubsubver}
32-
%global githubfull %{githubname}-%{githubver}.%{githubsubver}
33-
%else
34-
%global githubfull %{githubname}-%{githubver}
35-
%endif
36-
37-
# disable producing debuginfo for this package
38-
%global debug_package %{nil}
39-
40-
41-
Summary: Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies
42-
Name: %{githubname}
43-
Release: 2%{?dist}
44-
Version: %{githubver}
45-
License: BSD
46-
ExclusiveArch: x86_64 i686 i586
47-
%if %{defined githubsubver}
48-
Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.%{githubsubver}.tar.gz#/%{name}-%{version}.tar.gz
49-
%else
50-
Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz#/%{name}-%{version}.tar.gz
51-
%endif
52-
URL: https://github.com/01org/%{githubname}
53-
BuildRequires: gcc, make
28+
%global libpqos_ver 6.0.0
29+
%global desc %{expand: \
30+
This package provides basic support for Intel Resource Director Technology
31+
including, Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring
32+
(MBM), Cache Allocation Technology (CAT), Code and Data Prioritization
33+
(CDP) and Memory Bandwidth Allocation (MBA).}
34+
35+
Name: intel-cmt-cat
36+
Version: 24.05
37+
Release: 1%{?dist}
38+
Summary: Intel cache monitoring and allocation technology config tool
39+
40+
License: BSD-3-Clause
41+
URL: https://github.com/intel/intel-cmt-cat
42+
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
43+
44+
Patch0: 0001-alter-install-paths.patch
45+
Patch1: 0002-remove-build-and-install-of-examples.patch
46+
Patch2: 0003-allow-debian-flags-to-be-added.patch
47+
48+
ExclusiveArch: x86_64
49+
50+
BuildRequires: gcc
51+
BuildRequires: make
5452

5553
%description
56-
This software package provides basic support for
57-
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
58-
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
59-
and Code Data Prioratization (CDP).
60-
61-
CMT, MBM and CAT are configured using Model Specific Registers (MSRs)
62-
to measure last level cache occupancy, set up the class of service masks and
63-
manage the association of the cores/logical threads to a class of service.
64-
The software executes in user space, and access to the MSRs is
65-
obtained through a standard Linux* interface. The virtual file system
66-
provides an interface to read and write the MSR registers but
67-
it requires root privileges.
68-
69-
%package -n intel-cmt-cat-devel
70-
Summary: Library and sample code to use CMT, MBM, CAT, CDP and MBA technologies
71-
License: BSD
72-
Requires: intel-cmt-cat == %{version}
73-
ExclusiveArch: x86_64 i686 i586
74-
75-
%description -n intel-cmt-cat-devel
76-
This software package provides basic support for
77-
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
78-
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
79-
and Code Data Prioratization (CDP).
80-
The package includes library, header file and sample code.
81-
82-
For additional information please refer to:
83-
https://github.com/01org/%{githubname}
54+
%{desc}
8455

85-
%prep
86-
%autosetup -n %{githubfull}
56+
%package devel
57+
Summary: Development files for %{name}
58+
Requires: %{name}%{?_isa} = %{version}-%{release}
8759

88-
%ldconfig_scriptlets
60+
%description devel %{desc}
61+
62+
Development files.
63+
64+
%prep
65+
%autosetup -p1 -n %{name}-%{version}
8966

9067
%build
91-
make %{?_smp_mflags}
68+
%make_build
9269

9370
%install
94-
# Not doing make install as it strips the symbols.
95-
# Using files from the build directory.
96-
install -d %{buildroot}/%{_bindir}
97-
install -s %{_builddir}/%{githubfull}/pqos/pqos %{buildroot}/%{_bindir}
98-
install %{_builddir}/%{githubfull}/pqos/pqos-os %{buildroot}/%{_bindir}
99-
install %{_builddir}/%{githubfull}/pqos/pqos-msr %{buildroot}/%{_bindir}
100-
sed -i "1s/.*/\#!\/usr\/bin\/bash/" %{buildroot}/%{_bindir}/pqos-*
101-
102-
install -d %{buildroot}/%{_mandir}/man8
103-
install -m 0644 %{_builddir}/%{githubfull}/pqos/pqos.8 %{buildroot}/%{_mandir}/man8
104-
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-os.8
105-
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-msr.8
106-
107-
install -d %{buildroot}/%{_bindir}
108-
install -s %{_builddir}/%{githubfull}/rdtset/rdtset %{buildroot}/%{_bindir}
109-
110-
install -d %{buildroot}/%{_mandir}/man8
111-
install -m 0644 %{_builddir}/%{githubfull}/rdtset/rdtset.8 %{buildroot}/%{_mandir}/man8
112-
113-
install -d %{buildroot}/%{_licensedir}/%{name}-%{version}
114-
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version}
115-
116-
# Install the library
117-
install -d %{buildroot}/%{_libdir}
118-
install -s %{_builddir}/%{githubfull}/lib/libpqos.so.* %{buildroot}/%{_libdir}
119-
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so %{buildroot}/%{_libdir}
120-
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so.4 %{buildroot}/%{_libdir}
121-
122-
# Install the header file
123-
install -d %{buildroot}/%{_includedir}
124-
install -m 0644 %{_builddir}/%{githubfull}/lib/pqos.h %{buildroot}/%{_includedir}
125-
126-
# Install license and sample code
127-
install -d %{buildroot}/%{_usrsrc}/%{githubfull}
128-
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_usrsrc}/%{githubfull}
129-
130-
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c
131-
132-
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
133-
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
134-
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/reset_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
135-
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l2cat.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
136-
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l3cat.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
137-
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_mba.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
138-
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/association_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
139-
140-
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
141-
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
142-
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/monitor_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
71+
%make_install
72+
73+
%ldconfig_scriptlets
14374

14475
%files
145-
%{_bindir}/pqos
146-
%{_bindir}/pqos-os
147-
%{_bindir}/pqos-msr
148-
%{_mandir}/man8/pqos.8.gz
149-
%{_mandir}/man8/pqos-os.8.gz
150-
%{_mandir}/man8/pqos-msr.8.gz
151-
%{_bindir}/rdtset
152-
%{_mandir}/man8/rdtset.8.gz
153-
%{_libdir}/libpqos.so.*
154-
155-
%{!?_licensedir:%global license %%doc}
156-
%license %{_licensedir}/%{name}-%{version}/LICENSE
157-
%doc ChangeLog README
158-
159-
%files -n intel-cmt-cat-devel
160-
%{_libdir}/libpqos.so
161-
%{_libdir}/libpqos.so.4
76+
%license LICENSE
77+
%doc ChangeLog README.md
78+
%{_bindir}/membw
79+
%{_sbindir}/pqos
80+
%{_sbindir}/pqos-msr
81+
%{_sbindir}/pqos-os
82+
%{_sbindir}/rdtset
83+
%{_lib64dir}/libpqos.so.6
84+
%{_lib64dir}/libpqos.so.%{libpqos_ver}
85+
%{_mandir}/man8/membw.8*
86+
%{_mandir}/man8/pqos.8*
87+
%{_mandir}/man8/pqos-msr.8*
88+
%{_mandir}/man8/pqos-os.8*
89+
%{_mandir}/man8/rdtset.8*
90+
91+
%files -n %{name}-devel
16292
%{_includedir}/pqos.h
163-
%{_usrsrc}/%{githubfull}/c/CAT_MBA/Makefile
164-
%{_usrsrc}/%{githubfull}/c/CAT_MBA/reset_app.c
165-
%{_usrsrc}/%{githubfull}/c/CAT_MBA/association_app.c
166-
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l2cat.c
167-
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l3cat.c
168-
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_mba.c
169-
%{_usrsrc}/%{githubfull}/c/CMT_MBM/Makefile
170-
%{_usrsrc}/%{githubfull}/c/CMT_MBM/monitor_app.c
171-
%doc %{_usrsrc}/%{githubfull}/LICENSE
93+
%{_lib64dir}/libpqos.so
17294

17395
%changelog
96+
* Mon Nov 11 2024 Sumit Jena <v-sumitjena@microsoft.com> - 24.05-1
97+
- Update to version 24.05
98+
- License verified.
99+
174100
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 4.1.0-2
175101
- Initial CBL-Mariner import from Fedora 33 (license: MIT).
176102

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7341,8 +7341,8 @@
73417341
"type": "other",
73427342
"other": {
73437343
"name": "intel-cmt-cat",
7344-
"version": "4.1.0",
7345-
"downloadUrl": "https://github.com/01org/intel-cmt-cat/archive/v4.1.0.tar.gz"
7344+
"version": "24.05",
7345+
"downloadUrl": "https://github.com/intel/intel-cmt-cat/archive/v24.05/intel-cmt-cat-24.05.tar.gz"
73467346
}
73477347
}
73487348
},

0 commit comments

Comments
 (0)