NVIDIA 615.71.09 DKMS build fails on Proxmox kernel 7.0.14-20/-23: incomplete type 'struct cxl_dev_state'

Đang mở
#1,433 2 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #1438 của @theaathish — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c, linux
Lĩnh vực
operating-systems

Hướng nghiên cứu

The failing declaration is at common/inc/nv-linux.h line 1270, guarded by NV_CXL_CXL_H_PRESENT. Compare the generated kernel-open/conftest/headers.h and functions.h, where NV_CXL_INIT_SUPPORTED is undefined, to see how the guard should depend on the functional check. Done means the DKMS build succeeds against 7.0.14-20-pve and 7.0.14-23-pve while still building on 7.0.14-19-pve.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

build-problem
NVIDIA Open GPU Kernel Modules Version

NVIDIA Open GPU Kernel Modules 615.71.09 Debian package: nvidia-kernel-open-dkms 615.71.09-2 Installed from the official NVIDIA CUDA repository for Debian 13 (trixie), using APT/DKMS. No custom Git commit or local patches.

Operating System and Version

Debian GNU/Linux 13 (trixie) Proxmox VE: pve-manager/9.2.21/4f6e0ac86f9e8c7f. Kernel packages from the official Proxmox pve-no-subscription repository.

Kernel Release

Currently running (working): Linux pve-p520 7.0.14-19-pve #1 SMP PREEMPT_DYNAMIC PMX 7.0.14-19 (2026-09-18T07:31Z) x86_64 GNU/Linux Affected stable Proxmox kernels: - 7.0.14-20-pve - 7.0.14-23-pve Both affected kernels are official Proxmox packages, not locally compiled kernels or release candidates. The NVIDIA DKMS module builds successfully on 7.0.14-19-pve but fails to compile on both newer kernels.

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.
  • I am running on a stable kernel release.
Build Command

The issue occurs automatically during a standard Proxmox APT upgrade:

apt update
apt full-upgrade

The kernel package post-installation script invokes DKMS automatically:

run-parts: executing /etc/kernel/postinst.d/dkms 7.0.14-23-pve /boot/vmlinuz-7.0.14-23-pve
Autoinstall of module nvidia/615.71.09 for kernel 7.0.14-23-pve (x86_64)

DKMS then invokes:

make -j20 KERNEL_UNAME=7.0.14-23-pve IGNORE_PREEMPT_RT_PRESENCE=1 IGNORE_XEN_PRESENCE=1 modules

The same failure occurs with kernel 7.0.14-20-pve.

Terminal output/Build Log

Relevant output from /var/lib/dkms/nvidia/615.71.09/build/make.log:

././common/inc/nv-linux.h:1270:34: error: field 'cxlds' has incomplete type

This error is repeated across multiple compilation units.

DKMS reports:

Autoinstall of module nvidia/615.71.09 for kernel 7.0.14-23-pve (x86_64)
Building module(s)...............(bad exit status: 2)
Error! Bad return status for module build on kernel: 7.0.14-23-pve (x86_64)
Autoinstall on 7.0.14-23-pve failed for module(s) nvidia(10).

Generated NVIDIA conftest results:

kernel-open/conftest/headers.h:

#define NV_CXL_CXL_H_PRESENT
#undef NV_CXL_PCI_H_PRESENT

kernel-open/conftest/functions.h:

#define NV_PCIE_IS_CXL_PRESENT
#undef NV_CXL_INIT_SUPPORTED

The build fails because nv-linux.h declares a field of type struct cxl_dev_state when NV_CXL_CXL_H_PRESENT is defined, even though the required CXL API is unavailable.

More Info

The currently running 7.0.14-19-pve kernel works correctly with the NVIDIA 615.71.09 driver and RTX A4000 GPU. The failure is reproducible during DKMS compilation against both newer kernel header versions, without booting those kernels.

Suspected root cause: CXL header-presence detection enables code requiring an unavailable CXL API

I investigated the difference between the working Proxmox kernel 7.0.14-19-pve and the failing kernels 7.0.14-20-pve and 7.0.14-23-pve.

The only difference found when comparing the include/cxl/ header directories between -19 and -20 is the addition of:

include/cxl/cxl.h

The new header contains only the declaration of cxl_region_contains_resource() (and its fallback implementation). It does not define struct cxl_dev_state.

On kernel 7.0.14-19-pve (working)
  • include/cxl/cxl.h is absent.
  • NVIDIA does not define NV_CXL_CXL_H_PRESENT.
  • The NVIDIA DKMS module builds successfully.
On kernels 7.0.14-20-pve and 7.0.14-23-pve (failing)
  • include/cxl/cxl.h exists.
  • NVIDIA defines NV_CXL_CXL_H_PRESENT.
  • NVIDIA correctly reports #undef NV_CXL_INIT_SUPPORTED.
  • However, common/inc/nv-linux.h still enables code containing struct cxl_dev_state cxlds.
  • Compilation fails because struct cxl_dev_state is incomplete.

The relevant declaration is at common/inc/nv-linux.h:1270.

The generated NVIDIA conftest results confirm:

kernel-open/conftest/headers.h:

#define NV_CXL_CXL_H_PRESENT
#undef NV_CXL_PCI_H_PRESENT

kernel-open/conftest/functions.h:

#define NV_PCIE_IS_CXL_PRESENT
#undef NV_CXL_INIT_SUPPORTED

The cxl_init_supported conftest appears to correctly detect the missing API, but the affected declaration is guarded by NV_CXL_CXL_H_PRESENT rather than the functional capability test.

This suggests that the declaration in nv-linux.h should also be conditional on NV_CXL_INIT_SUPPORTED, or otherwise guarded by a more specific API compatibility check.

Expected behavior

When the CXL API required by NVIDIA is unavailable, CXL-specific declarations should be disabled so the driver can compile successfully.

Actual behavior

The presence of a cxl/cxl.h header that does not provide the required CXL API activates incompatible CXL code, causing DKMS compilation to fail:

././common/inc/nv-linux.h:1270:34: error: field 'cxlds' has incomplete type
Hardware
  • GPU: NVIDIA RTX A4000 (16 GB)
  • CPU: Intel Xeon W-2255
  • System: Lenovo ThinkStation P520
  • Architecture: x86_64
  • OS: Debian GNU/Linux 13 (trixie)
  • Hypervisor: Proxmox VE 9.2.21
  • NVIDIA package: nvidia-kernel-open-dkms 615.71.09-2

No local patches have been applied to the NVIDIA driver or kernel sources.

Ngôn ngữ chính
C
Star
17.5k
Fork
1.9k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/open-gpu-kernel-modules

Tất cả issue của NVIDIA/open-gpu-kernel-modules

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.