cudaHostRegister for read-only shared memory on GeForce RTX: support and alternatives

I would appreciate NVIDIA’s guidance on registering CPU-read-only shared memory for asynchronous host-to-device transfers on Linux.

Use case: an iceoryx2 consumer receives a read-only mapping of shared host memory. The producer fills a buffer, publishes it, and the consumer needs to copy it to device memory without an intermediate CPU copy. The source buffer must remain valid and unchanged until the transfer completes; this is not a request for concurrent writes during DMA.

The current machine is reported as RTX 4060 on Ubuntu 24.04. Exact driver/runtime versions and device-attribute outputs are not included yet, so this post asks about supported usage rather than presenting a fully diagnosed device-specific failure.

The target GPU families include GeForce RTX 3060, RTX 4060 and RTX 4090. These are support targets, not a claim that the same failure has been reproduced on all three.

The CUDA Runtime documentation states that cudaHostRegisterReadOnly is required to register CPU-read-only memory on platforms without cudaDevAttrPageableMemoryAccessUsesHostPageTables, and that using this flag returns cudaErrorNotSupported when cudaDevAttrHostRegisterReadOnlySupported is 0.

Could NVIDIA clarify:

  1. What hardware, driver, OS and kernel requirements determine cudaDevAttrHostRegisterReadOnlySupported? Is there a support matrix for the GeForce RTX models above, including laptop variants where applicable?
  2. When HostRegisterReadOnlySupported and PageableMemoryAccessUsesHostPageTables are both 0, is there a supported way to register an existing PROT_READ shared-memory mapping as an asynchronous H2D source without an intermediate CPU copy? We need H2D copying, not direct kernel access to host memory.
  3. If the shared-memory object can legitimately be opened read/write, is it supported to retain the application’s PROT_READ mapping and create a second MAP_SHARED, PROT_READ | PROT_WRITE mapping of the same bytes, then cudaHostRegister and perform H2D using only that second mapping? What restrictions apply to aliases, overlapping registrations, synchronization, lifetime and cudaHostUnregister? We understand this introduces a writable mapping into the consumer process and does not preserve strict process-wide write isolation.
  4. If strict read-only access must be preserved, is a reusable cudaMallocHost/cudaHostAlloc staging buffer followed by H2D the recommended fallback?

A MAP_PRIVATE copy-on-write mapping would not satisfy the shared-update semantics required by this use case.

Related historical discussion:

CUDA Runtime reference:

This is a supported-usage and compatibility question; no complete reproducer or per-model failure matrix is being claimed here.

Some years ago, I have successfully used cudaHostRegisterReadOnly on both consumer cards and professional cards.

Beginning of this year, I noticed that cudaDevAttrHostRegisterReadOnlySupported would always be 0 if the open source kernel module was used instead of the proprietary nvidia kernel module. The bug report which I opened for this is not resolved yet but I got the following response:

Please try if disabling HMM 1. CUDA 12.8 Update 1 Release Notes — Release Notes 12.8 documentation works for you. This is the thing we are also trying with, just try to give close update to you in case anything is blocking there. The thorough conclusion is still in internal checking.

I have not investigated this issue further since then.

Thanks @striker159, your pointer was helpful. We checked an RTX 3060 with the proprietary NVIDIA kernel module, driver 525.147.05. CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED returned 1, and the query completed successfully. This confirms that this configuration reports support. We have not yet tested registration of the read-only shared-memory mapping or the H2D transfer.