From 50e54ed1ee3cd7827d01458f8b3b2b22eff833b8 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 30 Sep 2026 14:40:01 -0400 Subject: GSPRM CLK legacy controls: populate the domain queries the runtime clock helper gates on The static CUDA runtime's device init failed with cudaErrorInitializationError even though every kernel ioctl returned 0: cuInit succeeded and then cuDeviceGetAttribute(ECC_ENABLED=36) returned CUDA_ERROR_NOT_FOUND (500). Tracing libcuda's clock-domain helper (libcuda+0xe8c410) shows it issues the CLK legacy controls 0x20809009/0x20809064/0x20809001 and bails with 500 when the replies do not carry the expected domain bits/entries; the dependent attribute getters (ECC_ENABLED, TOTAL_CONSTANT_MEMORY) then abort init. Reply to the three queries with the minimal fields the helper checks: bits 32|34 present in 0x20809009, non-zero domain entries at offsets 12/20/28/36 of 0x20809064, and a matching selector in 0x20809001. No frequencies are fabricated (all other fields stay zero). Verified in the guest with the stock 570.144 static-cudart vectorAdd client: cudaGetDeviceCount -> rc=0 (ndev=1), cudaSetDevice, cudaFree, three cudaMallocs and both HtoD copies all return rc=0; the client then parks in cudaDeviceSynchronize waiting for the (not yet forwarded) kernel launch. --- kernel/gsp_rm_tu104.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kernel/gsp_rm_tu104.h') diff --git a/kernel/gsp_rm_tu104.h b/kernel/gsp_rm_tu104.h index 7cd5a4b..b5ee4d7 100644 --- a/kernel/gsp_rm_tu104.h +++ b/kernel/gsp_rm_tu104.h @@ -728,6 +728,9 @@ static const struct tu104_internal_device_info tu104_internal_device_table[] = { #define TU104_CTRL_FIFO_GET_DEVICE_INFO_TABLE 0x20801112 #define TU104_CTRL_INTERNAL_INTR_GET_KERNEL_TABLE 0x20800a5c #define TU104_CTRL_GPU_GET_CONSTRUCTED_FALCON_INFO 0x208001b0 +#define TU104_CTRL_CLK_DOMAIN_MASK 0x20809009 +#define TU104_CTRL_CLK_DOMAIN_DATA 0x20809064 +#define TU104_CTRL_CLK_DOMAIN_SEL 0x20809001 #define TU104_CTRL_INTERNAL_FIFO_GET_NUM_CHANNELS 0x20800a61 #define TU104_CTRL_BUS_GET_PCI_BAR_INFO 0x20801803 #define TU104_CTRL_INTERNAL_DISPLAY_GET_STATIC_INFO 0x20800a01 -- cgit v1.2.3