Skip to content

Commit ca09591

Browse files
committed
550.144.03
1 parent 346011d commit ca09591

File tree

22 files changed

+590
-642
lines changed

22 files changed

+590
-642
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NVIDIA Linux Open GPU Kernel Module Source
22

33
This is the source release of the NVIDIA Linux open GPU kernel modules,
4-
version 550.142.
4+
version 550.144.03.
55

66

77
## How to Build
@@ -17,7 +17,7 @@ as root:
1717

1818
Note that the kernel modules built here must be used with GSP
1919
firmware and user-space NVIDIA GPU driver components from a corresponding
20-
550.142 driver release. This can be achieved by installing
20+
550.144.03 driver release. This can be achieved by installing
2121
the NVIDIA GPU driver from the .run file using the `--no-kernel-modules`
2222
option. E.g.,
2323

@@ -188,7 +188,7 @@ encountered specific to them.
188188
For details on feature support and limitations, see the NVIDIA GPU driver
189189
end user README here:
190190

191-
https://us.download.nvidia.com/XFree86/Linux-x86_64/550.142/README/kernel_open.html
191+
https://us.download.nvidia.com/XFree86/Linux-x86_64/550.144.03/README/kernel_open.html
192192

193193
For vGPU support, please refer to the README.vgpu packaged in the vGPU Host
194194
Package for more details.

kernel-open/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ EXTRA_CFLAGS += -I$(src)/common/inc
8686
EXTRA_CFLAGS += -I$(src)
8787
EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
8888
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
89-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"550.142\"
89+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"550.144.03\"
9090

9191
ifneq ($(SYSSRCHOST1X),)
9292
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)

kernel-open/conftest.sh

Lines changed: 122 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5583,6 +5583,23 @@ compile_test() {
55835583
else
55845584
echo "#undef NV_OF_PROPERTY_READ_VARIABLE_U32_ARRAY_PRESENT" | append_conftest "functions"
55855585
fi
5586+
;;
5587+
5588+
module_import_ns_takes_string_literal)
5589+
#
5590+
# Determine if the MODULE_IMPORT_NS macro takes a string literal
5591+
# or constant.
5592+
#
5593+
# Commit cdd30ebb1b9f ("module: Convert symbol namespace to
5594+
# string literal") changed MODULE_IMPORT_NS to take a string
5595+
# literal in Linux kernel v6.13.
5596+
#
5597+
CODE="
5598+
#include <linux/module.h>
5599+
5600+
MODULE_IMPORT_NS(DMA_BUF);"
5601+
5602+
compile_check_conftest "$CODE" "NV_MODULE_IMPORT_NS_TAKES_STRING_LITERAL" "" "functions"
55865603
;;
55875604

55885605
devm_of_platform_populate)
@@ -6616,7 +6633,8 @@ compile_test() {
66166633
# Determine whether drm_fbdev_ttm_setup is present.
66176634
#
66186635
# Added by commit aae4682e5d66 ("drm/fbdev-generic:
6619-
# Convert to fbdev-ttm") in v6.11.
6636+
# Convert to fbdev-ttm") in v6.11. Removed by commit
6637+
# 1000634477d8 ("drm/fbdev-ttm:Convert to client-setup") in v6.13.
66206638
#
66216639
CODE="
66226640
#include <drm/drm_fb_helper.h>
@@ -6630,6 +6648,25 @@ compile_test() {
66306648
compile_check_conftest "$CODE" "NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions"
66316649
;;
66326650

6651+
drm_client_setup)
6652+
#
6653+
# Determine whether drm_client_setup is present.
6654+
#
6655+
# Added by commit d07fdf922592 ("drm/fbdev-ttm:
6656+
# Convert to client-setup") in v6.13.
6657+
#
6658+
CODE="
6659+
#include <drm/drm_fb_helper.h>
6660+
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
6661+
#include <drm/drm_client_setup.h>
6662+
#endif
6663+
void conftest_drm_client_setup(void) {
6664+
drm_client_setup();
6665+
}"
6666+
6667+
compile_check_conftest "$CODE" "NV_DRM_CLIENT_SETUP_PRESENT" "" "functions"
6668+
;;
6669+
66336670
drm_output_poll_changed)
66346671
#
66356672
# Determine whether drm_mode_config_funcs.output_poll_changed
@@ -6653,6 +6690,38 @@ compile_test() {
66536690
compile_check_conftest "$CODE" "NV_DRM_OUTPUT_POLL_CHANGED_PRESENT" "" "types"
66546691
;;
66556692

6693+
aperture_remove_conflicting_devices)
6694+
#
6695+
# Determine whether aperture_remove_conflicting_devices is present.
6696+
#
6697+
# Added by commit 7283f862bd991 ("drm: Implement DRM aperture
6698+
# helpers under video/") in v6.0
6699+
CODE="
6700+
#if defined(NV_LINUX_APERTURE_H_PRESENT)
6701+
#include <linux/aperture.h>
6702+
#endif
6703+
void conftest_aperture_remove_conflicting_devices(void) {
6704+
aperture_remove_conflicting_devices();
6705+
}"
6706+
compile_check_conftest "$CODE" "NV_APERTURE_REMOVE_CONFLICTING_DEVICES_PRESENT" "" "functions"
6707+
;;
6708+
6709+
aperture_remove_conflicting_pci_devices)
6710+
#
6711+
# Determine whether aperture_remove_conflicting_pci_devices is present.
6712+
#
6713+
# Added by commit 7283f862bd991 ("drm: Implement DRM aperture
6714+
# helpers under video/") in v6.0
6715+
CODE="
6716+
#if defined(NV_LINUX_APERTURE_H_PRESENT)
6717+
#include <linux/aperture.h>
6718+
#endif
6719+
void conftest_aperture_remove_conflicting_pci_devices(void) {
6720+
aperture_remove_conflicting_pci_devices();
6721+
}"
6722+
compile_check_conftest "$CODE" "NV_APERTURE_REMOVE_CONFLICTING_PCI_DEVICES_PRESENT" "" "functions"
6723+
;;
6724+
66566725
drm_aperture_remove_conflicting_pci_framebuffers)
66576726
#
66586727
# Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present.
@@ -6746,17 +6815,17 @@ compile_test() {
67466815
# This test is not complete and may return false positive.
67476816
#
67486817
CODE="
6749-
#include <crypto/akcipher.h>
6750-
#include <crypto/algapi.h>
6751-
#include <crypto/ecc_curve.h>
6752-
#include <crypto/ecdh.h>
6753-
#include <crypto/hash.h>
6754-
#include <crypto/internal/ecc.h>
6755-
#include <crypto/kpp.h>
6756-
#include <crypto/public_key.h>
6757-
#include <crypto/sm3.h>
6758-
#include <keys/asymmetric-type.h>
6759-
#include <linux/crypto.h>
6818+
#include <crypto/akcipher.h>
6819+
#include <crypto/algapi.h>
6820+
#include <crypto/ecc_curve.h>
6821+
#include <crypto/ecdh.h>
6822+
#include <crypto/hash.h>
6823+
#include <crypto/internal/ecc.h>
6824+
#include <crypto/kpp.h>
6825+
#include <crypto/public_key.h>
6826+
#include <crypto/sm3.h>
6827+
#include <keys/asymmetric-type.h>
6828+
#include <linux/crypto.h>
67606829
void conftest_crypto(void) {
67616830
struct shash_desc sd;
67626831
struct crypto_shash cs;
@@ -6766,6 +6835,47 @@ compile_test() {
67666835
compile_check_conftest "$CODE" "NV_CRYPTO_PRESENT" "" "symbols"
67676836
;;
67686837

6838+
crypto_akcipher_verify)
6839+
#
6840+
# Determine whether the crypto_akcipher_verify API is still present.
6841+
# It was removed by commit 6b34562 ('crypto: akcipher - Drop sign/verify operations')
6842+
# in v6.13-rc1 (2024-10-04).
6843+
#
6844+
# This test is dependent on the crypto conftest to determine whether crypto should be
6845+
# enabled at all. That means that if the kernel is old enough such that crypto_akcipher_verify
6846+
#
6847+
# The test merely checks for the presence of the API, as it assumes that if the API
6848+
# is no longer present, the new API to replace it (crypto_sig_verify) must be present.
6849+
# If the kernel version is too old to have crypto_akcipher_verify, it will fail the crypto
6850+
# conftest above and all crypto code will be compiled out.
6851+
#
6852+
CODE="
6853+
#include <crypto/akcipher.h>
6854+
#include <linux/crypto.h>
6855+
void conftest_crypto_akcipher_verify(void) {
6856+
(void)crypto_akcipher_verify;
6857+
}"
6858+
6859+
compile_check_conftest "$CODE" "NV_CRYPTO_AKCIPHER_VERIFY_PRESENT" "" "symbols"
6860+
;;
6861+
6862+
ecc_digits_from_bytes)
6863+
#
6864+
# Determine whether ecc_digits_from_bytes is present.
6865+
# It was added in commit c6ab5c915da4 ('crypto: ecc - Prevent ecc_digits_from_bytes from
6866+
# reading too many bytes') in v6.10.
6867+
#
6868+
# This functionality is needed when crypto_akcipher_verify is not present.
6869+
#
6870+
CODE="
6871+
#include <crypto/internal/ecc.h>
6872+
void conftest_ecc_digits_from_bytes(void) {
6873+
(void)ecc_digits_from_bytes;
6874+
}"
6875+
6876+
compile_check_conftest "$CODE" "NV_ECC_DIGITS_FROM_BYTES_PRESENT" "" "symbols"
6877+
;;
6878+
67696879
mempolicy_has_unified_nodes)
67706880
#
67716881
# Determine if the 'mempolicy' structure has

kernel-open/header-presence-tests.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ NV_HEADER_PRESENCE_TESTS = \
1616
drm/drm_drv.h \
1717
drm/drm_fbdev_generic.h \
1818
drm/drm_fbdev_ttm.h \
19+
drm/drm_client_setup.h \
1920
drm/drm_framebuffer.h \
2021
drm/drm_connector.h \
2122
drm/drm_probe_helper.h \
@@ -33,6 +34,7 @@ NV_HEADER_PRESENCE_TESTS = \
3334
generated/autoconf.h \
3435
generated/compile.h \
3536
generated/utsrelease.h \
37+
linux/aperture.h \
3638
linux/efi.h \
3739
linux/kconfig.h \
3840
linux/platform/tegra/mc_utils.h \
@@ -99,5 +101,6 @@ NV_HEADER_PRESENCE_TESTS = \
99101
linux/cc_platform.h \
100102
asm/cpufeature.h \
101103
linux/mpi.h \
102-
asm/mshyperv.h
104+
asm/mshyperv.h \
105+
crypto/sig.h
103106

kernel-open/nvidia-drm/nvidia-drm-conftest.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@
6262
#undef NV_DRM_FENCE_AVAILABLE
6363
#endif
6464

65+
#if defined(NV_DRM_CLIENT_SETUP_PRESENT) && \
66+
(defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) || \
67+
defined(NV_APERTURE_REMOVE_CONFLICTING_PCI_DEVICES_PRESENT))
68+
#define NV_DRM_FBDEV_AVAILABLE
69+
#define NV_DRM_CLIENT_AVAILABLE
70+
#endif
71+
6572
/*
6673
* We can support color management if either drm_helper_crtc_enable_color_mgmt()
6774
* or drm_crtc_enable_color_mgmt() exist.

kernel-open/nvidia-drm/nvidia-drm-drv.c

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,22 @@
6464
#include <drm/drm_ioctl.h>
6565
#endif
6666

67-
#if defined(NV_DRM_FBDEV_AVAILABLE)
67+
#if defined(NV_LINUX_APERTURE_H_PRESENT)
68+
#include <linux/aperture.h>
69+
#endif
70+
71+
#if defined(NV_DRM_DRM_APERTURE_H_PRESENT)
6872
#include <drm/drm_aperture.h>
73+
#endif
74+
75+
#if defined(NV_DRM_FBDEV_AVAILABLE)
6976
#include <drm/drm_fb_helper.h>
7077
#endif
7178

79+
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
80+
#include <drm/drm_client_setup.h>
81+
#endif
82+
7283
#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
7384
#include <drm/drm_fbdev_ttm.h>
7485
#elif defined(NV_DRM_DRM_FBDEV_GENERIC_H_PRESENT)
@@ -1726,6 +1737,9 @@ static struct drm_driver nv_drm_driver = {
17261737
#elif defined(NV_DRM_DRIVER_HAS_LEGACY_DEV_LIST)
17271738
.legacy_dev_list = LIST_HEAD_INIT(nv_drm_driver.legacy_dev_list),
17281739
#endif
1740+
#if defined(DRM_FBDEV_TTM_DRIVER_OPS)
1741+
DRM_FBDEV_TTM_DRIVER_OPS,
1742+
#endif
17291743
};
17301744

17311745

@@ -1827,13 +1841,21 @@ void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info)
18271841
if (bus_is_pci) {
18281842
struct pci_dev *pdev = to_pci_dev(device);
18291843

1844+
#if defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT)
1845+
18301846
#if defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_HAS_DRIVER_ARG)
18311847
drm_aperture_remove_conflicting_pci_framebuffers(pdev, &nv_drm_driver);
18321848
#else
18331849
drm_aperture_remove_conflicting_pci_framebuffers(pdev, nv_drm_driver.name);
18341850
#endif
1851+
1852+
#elif defined(NV_APERTURE_REMOVE_CONFLICTING_PCI_DEVICES_PRESENT)
1853+
aperture_remove_conflicting_pci_devices(pdev, nv_drm_driver.name);
1854+
#endif
18351855
}
1836-
#if defined(NV_DRM_FBDEV_TTM_AVAILABLE)
1856+
#if defined(NV_DRM_CLIENT_AVAILABLE)
1857+
drm_client_setup(dev, NULL);
1858+
#elif defined(NV_DRM_FBDEV_TTM_AVAILABLE)
18371859
drm_fbdev_ttm_setup(dev, 32);
18381860
#elif defined(NV_DRM_FBDEV_GENERIC_AVAILABLE)
18391861
drm_fbdev_generic_setup(dev, 32);

kernel-open/nvidia-drm/nvidia-drm-sources.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += dma_fence_set_error
6666
NV_CONFTEST_FUNCTION_COMPILE_TESTS += fence_set_error
6767
NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence
6868
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers
69+
NV_CONFTEST_FUNCTION_COMPILE_TESTS += aperture_remove_conflicting_devices
70+
NV_CONFTEST_FUNCTION_COMPILE_TESTS += aperture_remove_conflicting_pci_devices
6971
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup
7072
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup
73+
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_client_setup
7174
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property
7275
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt
7376
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt

kernel-open/nvidia-uvm/uvm_hmm.c

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static uvm_va_block_t *hmm_va_block_from_node(uvm_range_tree_node_t *node)
163163
// Copies the contents of the source device-private page to the
164164
// destination CPU page. This will invalidate mappings, so cannot be
165165
// called while holding any va_block locks.
166-
static void hmm_copy_devmem_page(struct page *dst_page, struct page *src_page)
166+
static NV_STATUS hmm_copy_devmem_page(struct page *dst_page, struct page *src_page)
167167
{
168168
uvm_tracker_t tracker = UVM_TRACKER_INIT();
169169
uvm_gpu_phys_address_t src_addr;
@@ -207,7 +207,7 @@ static void hmm_copy_devmem_page(struct page *dst_page, struct page *src_page)
207207
uvm_push_end(&push);
208208
status = uvm_tracker_add_push_safe(&tracker, &push);
209209
if (status == NV_OK)
210-
uvm_tracker_wait_deinit(&tracker);
210+
status = uvm_tracker_wait_deinit(&tracker);
211211

212212
out_unmap_cpu:
213213
uvm_parent_gpu_unmap_cpu_pages(gpu->parent, dma_addr, PAGE_SIZE);
@@ -216,12 +216,7 @@ static void hmm_copy_devmem_page(struct page *dst_page, struct page *src_page)
216216
uvm_mmu_chunk_unmap(gpu_chunk, NULL);
217217

218218
out:
219-
// We can't fail eviction because we need to free the device-private pages
220-
// so the GPU can be unregistered. So the best we can do is warn on any
221-
// failures and zero the uninitialised page. This could result in data loss
222-
// in the application but failures are not expected.
223-
if (WARN_ON(status != NV_OK))
224-
memzero_page(dst_page, 0, PAGE_SIZE);
219+
return status;
225220
}
226221

227222
static NV_STATUS uvm_hmm_pmm_gpu_evict_pfn(unsigned long pfn)
@@ -246,7 +241,12 @@ static NV_STATUS uvm_hmm_pmm_gpu_evict_pfn(unsigned long pfn)
246241

247242
lock_page(dst_page);
248243

249-
hmm_copy_devmem_page(dst_page, migrate_pfn_to_page(src_pfn));
244+
// We can't fail eviction because we need to free the device-private
245+
// pages so the GPU can be unregistered. So the best we can do is warn
246+
// on any failures and zero the uninitialized page. This could result
247+
// in data loss in the application but failures are not expected.
248+
if (hmm_copy_devmem_page(dst_page, migrate_pfn_to_page(src_pfn)) != NV_OK)
249+
memzero_page(dst_page, 0, PAGE_SIZE);
250250
dst_pfn = migrate_pfn(page_to_pfn(dst_page));
251251
migrate_device_pages(&src_pfn, &dst_pfn, 1);
252252
}
@@ -3487,12 +3487,17 @@ NV_STATUS uvm_hmm_remote_cpu_fault(struct vm_fault *vmf)
34873487
lock_page(dst_page);
34883488
dst_pfn = migrate_pfn(page_to_pfn(dst_page));
34893489

3490-
hmm_copy_devmem_page(dst_page, src_page);
3490+
status = hmm_copy_devmem_page(dst_page, src_page);
3491+
if (status != NV_OK) {
3492+
unlock_page(dst_page);
3493+
__free_page(dst_page);
3494+
dst_pfn = 0;
3495+
}
34913496
}
34923497

3493-
migrate_vma_pages(&args);
3494-
34953498
out:
3499+
if (status == NV_OK)
3500+
migrate_vma_pages(&args);
34963501
migrate_vma_finalize(&args);
34973502

34983503
return status;

kernel-open/nvidia/internal_crypt_lib.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
* old or even just user disabled. If we should use LKCA, include headers, else
6565
* define stubs to return errors.
6666
*/
67-
#if defined(NV_CRYPTO_PRESENT) && defined (NV_CONFIG_CRYPTO_PRESENT)
67+
#if defined(NV_CRYPTO_PRESENT) && defined (NV_CONFIG_CRYPTO_PRESENT) && \
68+
(defined(NV_CRYPTO_AKCIPHER_VERIFY_PRESENT) || \
69+
(defined(NV_CRYPTO_SIG_H_PRESENT) && defined(NV_ECC_DIGITS_FROM_BYTES_PRESENT)))
6870
#define USE_LKCA 1
6971
#endif
7072

0 commit comments

Comments
 (0)