Update to qatlib 26.02.0

Update to qatlib 26.02.0 @ fe4bb4b6
Add patch to force 32 bit MMIO CSR reads for GCC 16.1

Resolves: RHEL-115834

Signed-off-by: Vladislav Dronov <vdronov@redhat.com>
This commit is contained in:
Vladislav Dronov 2026-06-28 19:24:42 +02:00
parent 53488f5d9b
commit 1153dbfd9b
4 changed files with 55 additions and 21 deletions

View File

@ -0,0 +1,32 @@
diff --git a/quickassist/lookaside/access_layer/src/qat_direct/include/adf_platform_common.h b/quickassist/lookaside/access_layer/src/qat_direct/include/adf_platform_common.h
index 6956a5e02502..449ba2978a93 100644
--- a/quickassist/lookaside/access_layer/src/qat_direct/include/adf_platform_common.h
+++ b/quickassist/lookaside/access_layer/src/qat_direct/include/adf_platform_common.h
@@ -258,8 +258,21 @@ static inline unsigned int modulo(unsigned int data, unsigned int shift)
#define ICP_ADF_CSR_WR(csrAddr, csrOffset, val) \
(void)((*((volatile Cpa32U *)(((Cpa8U *)csrAddr) + csrOffset)) = (val)))
-/* CSR read macro */
-#define ICP_ADF_CSR_RD(csrAddr, csrOffset) \
- (*((volatile Cpa32U *)(((Cpa8U *)csrAddr) + csrOffset)))
+/*
+ * Force MMIO loads to remain 32-bit wide. GCC 16 may otherwise narrow a
+ * volatile 32-bit CSR read to a byte access when only one bit is tested,
+ * which breaks QAT mailbox CSRs that require DWORD transactions.
+ */
+static inline unsigned int icp_adf_csr_rd(void *csrAddr, unsigned int csrOffset)
+{
+ const volatile void *addr = ((char *)csrAddr) + csrOffset;
+ unsigned int val;
+
+ __asm__ __volatile__("movl (%1), %0" : "=r"(val) : "r"(addr) : "memory");
+
+ return val;
+}
+
+#define ICP_ADF_CSR_RD(csrAddr, csrOffset) icp_adf_csr_rd(csrAddr, csrOffset)
#endif /* ADF_PLATFORM_COMMON_H */
--
2.54.0

View File

@ -1,11 +0,0 @@
--- a/quickassist/utilities/service/qat.service.in 2023-03-01 19:19:59.000000000 +0100
+++ b/quickassist/utilities/service/qat.service.in 2026-02-05 07:59:15.379502501 +0100
@@ -44,6 +44,8 @@ RuntimeDirectoryMode=755
Environment="POLICY=0"
EnvironmentFile=-/etc/sysconfig/qat
ExecStartPre=/bin/sh -c "test $(getent group qat)"
+# A workaround for RHEL-133797 and RHEL-133799
+ExecStartPre=/bin/sh -c "restorecon /usr/lib/modules/$(uname -r)/modules.*"
ExecStartPre=@prefix@/sbin/qat_init.sh
ExecStart=@prefix@/sbin/qatmgr --policy=${POLICY}

View File

@ -3,12 +3,12 @@
%global libqat_soversion 4
%global libusdm_soversion 0
Name: qatlib
Version: 25.08.0
Release: 2%{?dist}
Version: 26.02.0
Release: 1%{?dist}
Summary: Intel QuickAssist user space library
# The entire source code is released under BSD.
# For a breakdown of inbound licenses see the INSTALL file.
License: BSD-3-Clause AND ( BSD-3-Clause OR GPL-2.0-only )
License: BSD-3-Clause
URL: https://github.com/intel/%{name}
Source0: https://github.com/intel/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: systemd gcc make autoconf autoconf-archive automake libtool systemd-devel openssl-devel zlib-devel nasm numactl-devel
@ -16,7 +16,12 @@ Recommends: qatlib-service
# https://bugzilla.redhat.com/show_bug.cgi?id=1897661
ExcludeArch: %{arm} aarch64 %{power64} s390x i686 riscv64
Patch0: qat-service-restorecon.patch
# A fix for RHEL-133799. Do not use selinux-policy package
# in containers and other systems that do not use SELinux.
Requires: (selinux-policy >= 38.1.80 if selinux-policy)
# Temporary fix for systems with gcc v16.1 (Fedora 44), see RHEL-173592
Patch0: force-32-bit-MMIO-CSR-reads.patch
%description
Intel QuickAssist Technology (Intel QAT) provides hardware acceleration
@ -59,11 +64,6 @@ QuickAssist Technology user space library (qatlib).
%prep
%autosetup -p1
# Create a sysusers.d config file
cat >qatlib.sysusers.conf <<EOF
g qat -
EOF
%build
autoreconf -vif
%configure --enable-legacy-algorithms
@ -84,12 +84,20 @@ install -m0644 -D qatlib.sysusers.conf %{buildroot}%{_sysusersdir}/qatlib.conf
%post service
%systemd_post qat.service
if [ -S /run/udev/control ] ; then
udevadm control --reload || :
udevadm trigger || :
fi
%preun service
%systemd_preun qat.service
%postun service
%systemd_postun_with_restart qat.service
if [ -S /run/udev/control ] ; then
udevadm control --reload || :
udevadm trigger || :
fi
%files
%doc INSTALL README.md
@ -136,10 +144,15 @@ install -m0644 -D qatlib.sysusers.conf %{buildroot}%{_sysusersdir}/qatlib.conf
%{_sbindir}/qatmgr
%{_sbindir}/qat_init.sh
%{_unitdir}/qat.service
%{_udevrulesdir}/99-qat-vfio.rules
%{_mandir}/man8/qatmgr.8*
%{_mandir}/man8/qat_init.sh.8*
%changelog
* Mon Jun 29 2026 Vladislav Dronov <vdronov@redhat.com> - 26.02.0-1
- Update to qatlib 26.02.0 @ fe4bb4b6 (RHEL-115834)
- Add patch to force 32 bit MMIO CSR reads for GCC 16.1
* Mon Feb 02 2026 Vladislav Dronov <vdronov@redhat.com> - 25.08.0-2
- Add a fix for a depmod issue (RHEL-91078)

View File

@ -1 +1 @@
SHA512 (qatlib-25.08.0.tar.gz) = d8bd6e17f212d1266337804d30b7f01b2887251ec7fbef80361959bf0d99168b68f169c85c8d1f80d7cf1fc29ea5f5c98965636187f776936175a7bd3e3b141d
SHA512 (qatlib-26.02.0.tar.gz) = 812d9d7b3ee9488da7479e65cea8c439efed09264f3e34d98ca4e80f69eeb9e1d880256de104f2e99a475784895d1e0a896e43c81036295b968d738e89f0c900