diff --git a/force-32-bit-MMIO-CSR-reads.patch b/force-32-bit-MMIO-CSR-reads.patch new file mode 100644 index 0000000..a30777c --- /dev/null +++ b/force-32-bit-MMIO-CSR-reads.patch @@ -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 + diff --git a/qat-service-restorecon.patch b/qat-service-restorecon.patch deleted file mode 100644 index 4713500..0000000 --- a/qat-service-restorecon.patch +++ /dev/null @@ -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} - diff --git a/qatlib.spec b/qatlib.spec index a2f64bf..c75baa3 100644 --- a/qatlib.spec +++ b/qatlib.spec @@ -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 < - 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 - 25.08.0-2 - Add a fix for a depmod issue (RHEL-91078) diff --git a/sources b/sources index c12162e..7fc12d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qatlib-25.08.0.tar.gz) = d8bd6e17f212d1266337804d30b7f01b2887251ec7fbef80361959bf0d99168b68f169c85c8d1f80d7cf1fc29ea5f5c98965636187f776936175a7bd3e3b141d +SHA512 (qatlib-26.02.0.tar.gz) = 812d9d7b3ee9488da7479e65cea8c439efed09264f3e34d98ca4e80f69eeb9e1d880256de104f2e99a475784895d1e0a896e43c81036295b968d738e89f0c900