BAR Resize from cuda program userspace?

Is there an undocumented way to request a resize on the BAR for devices with resizable BAR from user space? Is the only method to provide my own kernel module and manually call pci_resize_resource?

Background info, I am writing a program that utilizes GPUDrirect RDMA to perform DMA to an RTX A6000 utilizing lazy pinning. I would like to pin Gigabytes of memory, but the default BAR is too small.

Hi, we are also interested in this. @zach10 did your suggested approach work?

Hi, I’m interested in this too.

In case of a A600, you might want to check the display mode selector tool to set the BAR1 to 8GB.