selftests/vfio: Add NVIDIA GPU Falcon DMA test driver
Subsystems (4)
v12 cover selftests/vfio: Add NVIDIA GPU Falcon DMA test driver
Patch 1:
Add a chunking loop to vfio_pci_driver_memcpy() so that it handles arbitrarily sized memcpy requests by breaking them into max_memcpy_size-sized chunks. This allows tests to request any memcpy size. Update the test to use a size of 4x max_memcpy_size to exercise the chunking logic.
Patch 2:
Add vfio_pci_cmd_set()/vfio_pci_cmd_clear() macros for PCI_COMMAND operations.
Patch 3:
Allow drivers that cannot trigger MSI interrupts to leave the send_msi callback NULL. Tests check ops->send_msi directly and gracefully skip MSI-related operations when it is absent.
Patch 4:
Introduce the nv_falcon plugin driver, which extracts and adapts relevant functionality from NVIDIA's gpu-admin-tools project [1] and integrates it into the VFIO selftest framework. As a result, any system equipped with a PCIe slot and a supported NVIDIA GPU can now run VFIO DMA selftests using commonly available hardware.
Falcons are general-purpose microcontrollers present on NVIDIA GPUs that can perform DMA operations between system memory and device memory.
[1] https://github.com/NVIDIA/gpu-admin-tools
Note on version numbering: v1 through v9 were internal review iterations that were mistakenly carried over to the upstream submission. Apologies for the confusion, the internal changelog has been dropped.
Changes in v12:
- Split into 4 patches: moved PCI command macros into their own patch
- Placed PCI command macros next to the existing vfio_pci_config_*() routines
- Fixed memcpy_storm size to cap at memcpy_region.size / 2
Changes in v11:
- Split into 3 patches: added precursor patch that moves memcpy chunking into vfio_pci_driver_memcpy() and adds generic vfio_pci_cmd_set()/vfio_pci_cmd_clear() PCI command helpers
- Replaced feature flag with NULL send_msi callback check
- Renamed nv_falcons/ to nv_falcon/; moved struct gpu_device to .c file; renamed to_nv_gpu() to to_gpu_device()
- Allow gpu_poll_register() and fsp_poll_queue() callers to propagate timeout errors
- Fixed macro alignment in hw.h
Changes in v10:
- Replaced NULL pointer checks on send_msi() with per-device VFIO_PCI_DRIVER_F_NO_SEND_MSI feature flag
- Changed vfio_pci_driver_send_msi() to return int with the feature check moved inside, so callers branch on the return value
- Added fcntl_set_msi_nonblock(self) and updated ASSERT_NO_MSI(self) macros that check the flag internally
- Moved DMA execution from memcpy_start() to memcpy_wait() so that memcpy_start() stores parameters and returns immediately, emulating async behavior to conform to the memcpy_start()/memcpy_wait() contract
- Split GPU_ARCH_PASCAL into GPU_ARCH_PASCAL (P100, PMC reset) and GPU_ARCH_PASCAL_10X (P4/P40, engine reset) to match per-product reset behavior
- Minor cleanups: improved size_to_dma_encoding(), fixed DMA address bits mask
Rubin Du (4):
selftests/vfio: Add memcpy chunking to vfio_pci_driver_memcpy() selftests/vfio: Add generic PCI command register helpers selftests/vfio: Allow drivers without send_msi() support selftests/vfio: Add NVIDIA Falcon driver for DMA testing
.../selftests/vfio/lib/drivers/nv_falcon/hw.h | 348 ++++++++ .../vfio/lib/drivers/nv_falcon/nv_falcon.c | 755 ++++++++++++++++++ .../lib/include/libvfio/vfio_pci_device.h | 10 + tools/testing/selftests/vfio/lib/libvfio.mk | 2 + .../selftests/vfio/lib/vfio_pci_driver.c | 21 +- .../selftests/vfio/vfio_pci_driver_test.c | 57 +- 6 files changed, 1170 insertions(+), 23 deletions(-) create mode 100644 tools/testing/selftests/vfio/lib/drivers/nv_falcon/hw.h create mode 100644 tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c
--
2.43.0
PATCH v12 1/4 selftests/vfio: Add memcpy chunking to vfio_pci_driver_memcpy()
Add a chunking loop to vfio_pci_driver_memcpy() so that it breaks up large memcpy requests into max_memcpy_size-sized chunks. This allows callers to request any size without worrying about per-driver limits. The memcpy_start()/memcpy_wait() semantics are unchanged.
Update the test to use 4x max_memcpy_size so it exercises the new chunking path (4 iterations) while keeping execution fast for drivers with small DMA transfer sizes.
--- .../selftests/vfio/lib/vfio_pci_driver.c | 18 ++++++++++++++++-- .../selftests/vfio/vfio_pci_driver_test.c | 18 ++++++++++-------- 2 files changed, 26 insertions(+), 10 deletions(-)
tools/testing/selftests/vfio/lib/vfio_pci_driver.c +16 -2
@@ -106,7 +106,21 @@ int vfio_pci_driver_memcpy_wait(struct vfio_pci_device *device)int vfio_pci_driver_memcpy (struct vfio_pci_device *device,iova_t src,iova_t dst,u64 size) { -vfio_pci_driver_memcpy_start (device, src, dst, size,1 ); +struct vfio_pci_driver *driver = &device->driver; +u64 offset =0 ; + +while (offset < size) { +u64 chunk =min (size - offset, driver->max_memcpy_size); +int ret; + +vfio_pci_driver_memcpy_start (device, src + offset, + dst + offset, chunk,1 ); + ret =vfio_pci_driver_memcpy_wait (device); +if (ret) +return ret; + + offset += chunk; + } -return vfio_pci_driver_memcpy_wait (device); +return 0 ; }
tools/testing/selftests/vfio/vfio_pci_driver_test.c +10 -8
@@ -89,12 +89,12 @@ FIXTURE_SETUP(vfio_pci_driver_test) self->msi_fd = self->device->msi_eventfds[driver->msi];/* -* Use the maximum size supported by the device for memcpy operations, -* slimmed down to fit into the memcpy region (divided by 2 so src and -* dst regions do not overlap). +* Use 4x the driver's max_memcpy_size to exercise the chunking +* logic in vfio_pci_driver_memcpy(). Cap to half the memcpy +* region so src and dst do not overlap. */ - self->size = self->device->driver.max_memcpy_size; - self->size =min (self->size, self->memcpy_region.size /2 ); + self->size =min_t (u64, driver->max_memcpy_size *4 , + self->memcpy_region.size /2 ); self->src = self->memcpy_region.vaddr; self->dst = self->src + self->size;
@@ -211,6 +211,7 @@ TEST_F_TIMEOUT(vfio_pci_driver_test, memcpy_storm, 60) {struct vfio_pci_driver *driver = &self->device->driver;u64 total_size; +u64 size;u64 count;fcntl_set_nonblock (self->msi_fd);
@@ -221,13 +222,14 @@ TEST_F_TIMEOUT(vfio_pci_driver_test, memcpy_storm, 60)* will take too long. */ total_size =250UL *SZ_1G ; - count =min (total_size / self->size, driver->max_memcpy_count); + size =min (driver->max_memcpy_size, self->memcpy_region.size /2 ); + count =min (total_size / size, driver->max_memcpy_count); -printf ("Kicking off %lu memcpys of size 0x%lx\n" , count, self->size); +printf ("Kicking off %lu memcpys of size 0x%lx\n" , count, size);vfio_pci_driver_memcpy_start (self->device, self->src_iova, self->dst_iova, - self->size, count); + size, count);ASSERT_EQ (0 ,vfio_pci_driver_memcpy_wait (self->device));ASSERT_NO_MSI (self->msi_fd);
Signature · 1 line
2.43.0
Re: [PATCH v12 1/4] selftests/vfio: Add memcpy chunking to vfio_pci_driver_memcpy()
Quoted 10 lines · Rubin Du
Add a chunking loop to
vfio_pci_driver_memcpy()so that it breaks up large memcpy requests into max_memcpy_size-sized chunks. This allows callers to request any size without worrying about per-driver limits. The memcpy_start()/memcpy_wait() semantics are unchanged.Update the test to use 4x
max_memcpy_sizeso it exercises the new chunking path (4 iterations) while keeping execution fast for drivers with small DMA transfer sizes.Signed-off-by Rubin Du <[email protected]>
PATCH v12 2/4 selftests/vfio: Add generic PCI command register helpers
In reply to Rubin DuAdd vfio_pci_cmd_set()/vfio_pci_cmd_clear() read-modify-write macros for PCI_COMMAND in vfio_pci_device.h.
--- .../vfio/lib/include/libvfio/vfio_pci_device.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
tools/testing/selftests/vfio/lib/include/libvfio/vfio_pci_device.h +10 -0
@@ -65,6 +65,16 @@ void vfio_pci_config_access(struct vfio_pci_device *device, bool write,#define vfio_pci_config_writew (_d, _o, _v) vfio_pci_config_write(_d, _o, _v, u16)#define vfio_pci_config_writel (_d, _o, _v) vfio_pci_config_write(_d, _o, _v, u32) +#define vfio_pci_cmd_set (_device, _bits) do { \ + u16 __cmd = vfio_pci_config_readw((_device), PCI_COMMAND); \ + vfio_pci_config_writew((_device), PCI_COMMAND, __cmd | (_bits));\ +} while (0) + +#define vfio_pci_cmd_clear (_device, _bits) do { \ + u16 __cmd = vfio_pci_config_readw((_device), PCI_COMMAND); \ + vfio_pci_config_writew((_device), PCI_COMMAND, __cmd & ~(_bits));\ +} while (0) +void vfio_pci_irq_enable (struct vfio_pci_device *device,u32 index,u32 vector,int count);void vfio_pci_irq_disable (struct vfio_pci_device *device,u32 index);
Signature · 1 line
2.43.0
Re: [PATCH v12 2/4] selftests/vfio: Add generic PCI command register helpers
On 2026-04-03 04:44 PM, Rubin Du wrote:
nit: Please use "vfio: selftests: " to match the rest of the VFIO selftests commits.
git log --oneline tools/testing/selftests/vfio
Quoted 4 lines
Add vfio_pci_cmd_set()/vfio_pci_cmd_clear() read-modify-write macros for
PCI_COMMANDinvfio_pci_device.h.Signed-off-by Rubin Du <[email protected]>
David Matlack
maintainerRe: [PATCH v12 2/4] selftests/vfio: Add generic PCI command register helpers
In reply to Rubin DuQuoted 7 lines · Rubin Du
tools/testing/selftests/vfio/lib/include/libvfio/vfio_pci_device.h +0
-0@@ -65,6 +65,16 @@ void vfio_pci_config_access(struct vfio_pci_device *device, bool write,#define vfio_pci_config_writew (_d, _o, _v) vfio_pci_config_write(_d, _o, _v, u16)#define vfio_pci_config_writel (_d, _o, _v) vfio_pci_config_write(_d, _o, _v, u32)
tools/testing/selftests/vfio/lib/include/libvfio/vfio_pci_device.h void vfio_pci_config_access(struct vfio_pci_device *device, bool write, · line 76
Quoted 10 lines
tools/testing/selftests/vfio/lib/include/libvfio/vfio_pci_device.h +9
-0+#define vfio_pci_cmd_set (_device, _bits) do { \ + u16 __cmd = vfio_pci_config_readw((_device), PCI_COMMAND); \ + vfio_pci_config_writew((_device), PCI_COMMAND, __cmd | (_bits));\ +} while (0) + +#define vfio_pci_cmd_clear (_device, _bits) do { \ + u16 __cmd = vfio_pci_config_readw((_device), PCI_COMMAND); \ + vfio_pci_config_writew((_device), PCI_COMMAND, __cmd & ~(_bits));\ +} while (0)
Whoops, missed this in my previous email.
These should be static inline instead of macros.
PATCH v12 3/4 selftests/vfio: Allow drivers without send_msi() support
In reply to Rubin DuAllow drivers that cannot trigger MSI interrupts to leave the send_msi callback NULL. Add an fcntl_set_msi_nonblock() wrapper that only sets nonblocking mode when send_msi is available, and update ASSERT_NO_MSI() to skip when the driver lacks MSI support. The send_msi test SKIPs and mix_and_match skips the MSI portion per iteration.
--- .../selftests/vfio/vfio_pci_driver_test.c | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-)
tools/testing/selftests/vfio/vfio_pci_driver_test.c +26 -13
@@ -11,11 +11,18 @@static const char *device_bdf; -#define ASSERT_NO_MSI (_eventfd) do { \ - u64 __value; \ - \ - ASSERT_EQ(-1, read(_eventfd, &__value, 8)); \ - ASSERT_EQ(EAGAIN, errno); \ +#define fcntl_set_msi_nonblock (_self) do { \ + if (_self->device->driver.ops->send_msi) \ + fcntl_set_nonblock(_self->msi_fd); \ +} while (0) + +#define ASSERT_NO_MSI (_self) do { \ + u64 __value; \ + \ + if (!_self->device->driver.ops->send_msi) \ + break; \ + ASSERT_EQ(-1, read(_self->msi_fd, &__value, 8)); \ + ASSERT_EQ(EAGAIN, errno); \ } while (0) static void region_setup(struct iommu *iommu,
@@ -129,7 +136,7 @@ TEST_F(vfio_pci_driver_test, init_remove) TEST_F(vfio_pci_driver_test, memcpy_success) { -fcntl_set_nonblock (self->msi_fd); +fcntl_set_msi_nonblock (self);memset (self->src,'x' , self->size);memset (self->dst,'y' , self->size);
@@ -140,12 +147,12 @@ TEST_F(vfio_pci_driver_test, memcpy_success) self->size));ASSERT_EQ (0 ,memcmp (self->src, self->dst, self->size)); -ASSERT_NO_MSI (self->msi_fd); +ASSERT_NO_MSI (self); } TEST_F(vfio_pci_driver_test, memcpy_from_unmapped_iova) { -fcntl_set_nonblock (self->msi_fd); +fcntl_set_msi_nonblock (self);/* * Ignore the return value since not all devices will detect and report
@@ -154,12 +161,12 @@ TEST_F(vfio_pci_driver_test, memcpy_from_unmapped_iova)vfio_pci_driver_memcpy (self->device, self->unmapped_iova, self->dst_iova, self->size); -ASSERT_NO_MSI (self->msi_fd); +ASSERT_NO_MSI (self); } TEST_F(vfio_pci_driver_test, memcpy_to_unmapped_iova) { -fcntl_set_nonblock (self->msi_fd); +fcntl_set_msi_nonblock (self);/* * Ignore the return value since not all devices will detect and report
@@ -168,13 +175,16 @@ TEST_F(vfio_pci_driver_test, memcpy_to_unmapped_iova)vfio_pci_driver_memcpy (self->device, self->src_iova, self->unmapped_iova, self->size); -ASSERT_NO_MSI (self->msi_fd); +ASSERT_NO_MSI (self); } TEST_F(vfio_pci_driver_test, send_msi) {u64 value; +if (!self->device->driver.ops->send_msi) +SKIP (return,"Driver does not support send_msi()\n" ); +vfio_pci_driver_send_msi (self->device);ASSERT_EQ (8 ,read (self->msi_fd, &value,8 ));ASSERT_EQ (1 , value);
@@ -201,6 +211,9 @@ TEST_F(vfio_pci_driver_test, mix_and_match) self->dst_iova, self->size); +if (!self->device->driver.ops->send_msi) +continue ; +vfio_pci_driver_send_msi (self->device);ASSERT_EQ (8 ,read (self->msi_fd, &value,8 ));ASSERT_EQ (1 , value);
@@ -214,7 +227,7 @@ TEST_F_TIMEOUT(vfio_pci_driver_test, memcpy_storm, 60)u64 size;u64 count; -fcntl_set_nonblock (self->msi_fd); +fcntl_set_msi_nonblock (self);/* * Perform up to 250GiB worth of DMA reads and writes across several
@@ -232,7 +245,7 @@ TEST_F_TIMEOUT(vfio_pci_driver_test, memcpy_storm, 60) size, count);ASSERT_EQ (0 ,vfio_pci_driver_memcpy_wait (self->device)); -ASSERT_NO_MSI (self->msi_fd); +ASSERT_NO_MSI (self); }static bool device_has_selftests_driver (const char *bdf)
Signature · 1 line
2.43.0
Re: [PATCH v12 3/4] selftests/vfio: Allow drivers without send_msi() support
Quoted 7 lines · Rubin Du
Allow drivers that cannot trigger MSI interrupts to leave the
send_msicallback NULL. Add anfcntl_set_msi_nonblock()wrapper that only sets nonblocking mode whensend_msiis available, and updateASSERT_NO_MSI()to skip when the driver lacks MSI support. Thesend_msitest SKIPs andmix_and_matchskips the MSI portion per iteration.Signed-off-by Rubin Du <[email protected]>
PATCH v12 4/4 selftests/vfio: Add NVIDIA Falcon driver for DMA testing
In reply to Rubin DuAdd a new VFIO PCI driver for NVIDIA GPUs that enables DMA testing via the Falcon (Fast Logic Controller) microcontrollers. This driver extracts and adapts the DMA test functionality from NVIDIA's gpu-admin-tools project and integrates it into the existing VFIO selftest framework.
Falcons are general-purpose microcontrollers present on NVIDIA GPUs that can perform DMA operations between system memory and device memory. By leveraging Falcon DMA, this driver allows NVIDIA GPUs to be tested alongside Intel IOAT and DSA devices using the same selftest infrastructure.
The driver is named 'nv_falcon' to reflect that it specifically controls the Falcon microcontrollers for DMA operations, rather than exposing general GPU functionality.
Reference implementation:
https://github.com/NVIDIA/gpu-admin-tools
--- .../selftests/vfio/lib/drivers/nv_falcon/hw.h | 348 ++++++++ .../vfio/lib/drivers/nv_falcon/nv_falcon.c | 755 ++++++++++++++++++ tools/testing/selftests/vfio/lib/libvfio.mk | 2 + .../selftests/vfio/lib/vfio_pci_driver.c | 3 + 4 files changed, 1108 insertions(+) create mode 100644 tools/testing/selftests/vfio/lib/drivers/nv_falcon/hw.h create mode 100644 tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c
tools/testing/selftests/vfio/lib/drivers/nv_falcon/hw.h new file +348 -0
@@ -0,0 +1,348 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +*/ +#ifndef _NV_FALCON_HW_H_ +#define _NV_FALCON_HW_H_ + +/* PMC (Power Management Controller) Registers */ +#define NV_PMC_BOOT_0 0x00000000 +#define NV_PMC_ENABLE 0x00000200 +#define NV_PMC_ENABLE_PWR 0x00002000 +#define NV_PMC_ENABLE_HUB 0x20000000 + +/* Falcon Base Pages for Different Engines */ +#define NV_PPWR_FALCON_BASE 0x10a000 +#define NV_PGSP_FALCON_BASE 0x110000 + +/* Falcon Common Register Offsets (relative to base_page) */ +#define NV_FALCON_DMACTL_OFFSET 0x010c +#define NV_FALCON_ENGINE_RESET_OFFSET 0x03c0 + +/* DMEM Control Register Flags */ +#define NV_PPWR_FALCON_DMEMC_AINCR_TRUE 0x01000000 +#define NV_PPWR_FALCON_DMEMC_AINCW_TRUE 0x02000000 + +/* Falcon DMEM port offsets (for port 0) */ +#define NV_FALCON_DMEMC_OFFSET 0x1c0 +#define NV_FALCON_DMEMD_OFFSET 0x1c4 + +/* DMA Register Offsets (relative to base_page) */ +#define NV_FALCON_DMA_ADDR_LOW_OFFSET 0x110 +#define NV_FALCON_DMA_MEM_OFFSET 0x114 +#define NV_FALCON_DMA_CMD_OFFSET 0x118 +#define NV_FALCON_DMA_BLOCK_OFFSET 0x11c +#define NV_FALCON_DMA_ADDR_HIGH_OFFSET 0x128 + +/* DMA Global Address Top Bits Register */ +#define NV_GPU_DMA_ADDR_TOP_BITS_REG 0x100f04 + +/* DMA Command Register Bit Definitions */ +#define NV_FALCON_DMA_CMD_WRITE_BIT 0x20 +#define NV_FALCON_DMA_CMD_SIZE_SHIFT 8 +#define NV_FALCON_DMA_CMD_DONE_BIT 0x2 + +/* +* Falcon DMA is synchronous, so a transfer size and count larger than +* its per-operation maximum adds no value. +*/ + +/* DMA block size and alignment */ +#define NV_FALCON_DMA_MAX_TRANSFER_SIZE 256 +#define NV_FALCON_DMA_MAX_TRANSFER_COUNT 1 + +/* DMACTL register bits */ +#define NV_FALCON_DMACTL_DMEM_SCRUBBING 0x1 +#define NV_FALCON_DMACTL_READY_MASK 0x6 + +/* Falcon Core Selection Register */ +#define NV_FALCON_CORE_SELECT_OFFSET 0x1668 +#define NV_FALCON_CORE_SELECT_MASK 0x30 + +/* Falcon mailbox register (for Ada+ reset check) */ +#define NV_FALCON_MAILBOX_TEST_OFFSET 0x40c +#define NV_FALCON_MAILBOX_RESET_MAGIC 0xbadf5620 + +/* Falcon Message Queue Register Offsets (relative to base_page) */ +#define NV_FALCON_QUEUE_HEAD_BASE_OFFSET 0x2c00 +#define NV_FALCON_QUEUE_TAIL_BASE_OFFSET 0x2c04 +#define NV_FALCON_QUEUE_STRIDE 0x8 +#define NV_FALCON_MSG_QUEUE_HEAD_BASE_OFFSET 0x2c80 +#define NV_FALCON_MSG_QUEUE_TAIL_BASE_OFFSET 0x2c84 + +/* FSP Falcon Base Pages */ +#define NV_FSP_FALCON_BASE 0x8f0100 +/* base_page = cpuctl & ~0xfff */ +#define NV_FSP_FALCON_BASE_PAGE 0x8f0000 +#define NV_FSP_EMEM_BASE 0x8f2000 + +/* FSP EMEM Port Offsets (relative to FSP EMEM base) */ +#define NV_FSP_EMEMC_OFFSET 0xac0 +#define NV_FSP_EMEMD_OFFSET 0xac4 +#define NV_FSP_EMEM_PORT_STRIDE 0x8 + +/* EMEM Control Register Flags (same as DMEM) */ +#define NV_FALCON_EMEMC_AINCR 0x01000000 +#define NV_FALCON_EMEMC_AINCW 0x02000000 + +/* FSP RPC channel configuration */ +#define NV_FSP_RPC_CHANNEL_SIZE 1024 +#define NV_FSP_RPC_MAX_PACKET_SIZE 1024 +#define NV_FSP_RPC_CHANNEL_HOPPER 2 +#define NV_FSP_RPC_EMEM_BASE \ + (NV_FSP_RPC_CHANNEL_HOPPER * NV_FSP_RPC_CHANNEL_SIZE) + +/* FSP EMEM port 2 registers (pre-computed for Hopper channel 2) */ +#define NV_FSP_EMEM_PORT2_CTRL (NV_FSP_EMEM_BASE + NV_FSP_EMEMC_OFFSET + \ + NV_FSP_RPC_CHANNEL_HOPPER * NV_FSP_EMEM_PORT_STRIDE) +#define NV_FSP_EMEM_PORT2_DATA (NV_FSP_EMEM_BASE + NV_FSP_EMEMD_OFFSET + \ + NV_FSP_RPC_CHANNEL_HOPPER * NV_FSP_EMEM_PORT_STRIDE) + +/* FSP queue register offsets (pre-computed for Hopper channel 2) */ +#define NV_FSP_QUEUE_HEAD \ + (NV_FSP_FALCON_BASE_PAGE + NV_FALCON_QUEUE_HEAD_BASE_OFFSET + \ + NV_FSP_RPC_CHANNEL_HOPPER * NV_FALCON_QUEUE_STRIDE) +#define NV_FSP_QUEUE_TAIL \ + (NV_FSP_FALCON_BASE_PAGE + NV_FALCON_QUEUE_TAIL_BASE_OFFSET + \ + NV_FSP_RPC_CHANNEL_HOPPER * NV_FALCON_QUEUE_STRIDE) +#define NV_FSP_MSG_QUEUE_HEAD \ + (NV_FSP_FALCON_BASE_PAGE + NV_FALCON_MSG_QUEUE_HEAD_BASE_OFFSET + \ + NV_FSP_RPC_CHANNEL_HOPPER * NV_FALCON_QUEUE_STRIDE) +#define NV_FSP_MSG_QUEUE_TAIL \ + (NV_FSP_FALCON_BASE_PAGE + NV_FALCON_MSG_QUEUE_TAIL_BASE_OFFSET + \ + NV_FSP_RPC_CHANNEL_HOPPER * NV_FALCON_QUEUE_STRIDE) + +/* MCTP Header */ +#define NV_MCTP_HDR_SEID_SHIFT 16 +#define NV_MCTP_HDR_SEID_MASK 0xff +#define NV_MCTP_HDR_SEQ_SHIFT 28 +#define NV_MCTP_HDR_SEQ_MASK 0x3 +#define NV_MCTP_HDR_EOM_BIT 0x40000000 +#define NV_MCTP_HDR_SOM_BIT 0x80000000 + +/* MCTP Message Header */ +#define NV_MCTP_MSG_TYPE_SHIFT 0 +#define NV_MCTP_MSG_TYPE_MASK 0x7f +#define NV_MCTP_MSG_TYPE_VENDOR_DEFINED 0x7e +#define NV_MCTP_MSG_VENDOR_ID_SHIFT 8 +#define NV_MCTP_MSG_VENDOR_ID_MASK 0xffff +#define NV_MCTP_MSG_VENDOR_ID_NVIDIA 0x10de +#define NV_MCTP_MSG_NVDM_TYPE_SHIFT 24 +#define NV_MCTP_MSG_NVDM_TYPE_MASK 0xff + +/* NVDM response type */ +#define NV_NVDM_TYPE_RESPONSE 0x15 + +/* Minimum response size: mctp_hdr + msg_hdr + status_hdr + type + status */ +#define NV_FSP_RPC_MIN_RESPONSE_WORDS 5 + +/* FBIF (Frame Buffer Interface) Registers */ +/* Legacy PMU FBIF offsets (Kepler, Maxwell Gen1) */ +#define NV_PMU_LEGACY_FBIF_CTL_OFFSET 0x624 +#define NV_PMU_LEGACY_FBIF_TRANSCFG_OFFSET 0x600 + +/* PMU FBIF offsets */ +#define NV_PMU_FBIF_CTL_OFFSET 0xe24 +#define NV_PMU_FBIF_TRANSCFG_OFFSET 0xe00 + +/* GSP FBIF offsets */ +#define NV_GSP_FBIF_CTL_OFFSET 0x624 +#define NV_GSP_FBIF_TRANSCFG_OFFSET 0x600 + +/* OFA Falcon Base Page and FBIF offsets (used for Hopper+ DMA) */ +#define NV_OFA_FALCON_BASE 0x844000 +#define NV_OFA_FBIF_CTL_OFFSET 0x424 +#define NV_OFA_FBIF_TRANSCFG_OFFSET 0x400 + +/* OFA DMA support check register (Hopper+) */ +#define NV_OFA_DMA_SUPPORT_CHECK_REG 0x8443c0 + +/* FSP NVDM command types */ +#define NV_NVDM_TYPE_FBDMA 0x22 +#define NV_FBDMA_SUBCMD_ENABLE 0x1 + +/* FBIF CTL2 offset (relative to fbif_ctl) */ +#define NV_FBIF_CTL2_OFFSET 0x60 + +/* FBIF TRANSCFG register bits */ +#define NV_FBIF_TRANSCFG_TARGET_MASK 0x3 +#define NV_FBIF_TRANSCFG_SYSMEM_DEFAULT 0x5 + +/* FBIF CTL register bits */ +#define NV_FBIF_CTL_ALLOW_PHYS_MODE 0x10 +#define NV_FBIF_CTL_ALLOW_FULL_PHYS_MODE 0x80 + +/* Memory clear register offsets */ +#define NV_MEM_CLEAR_OFFSET 0x100b20 +#define NV_BOOT_COMPLETE_OFFSET 0x118234 +#define NV_BOOT_COMPLETE_MASK 0x3ff + +/* FSP boot complete register (Hopper+) */ +#define NV_FSP_BOOT_COMPLETE_OFFSET 0x200bc +#define NV_FSP_BOOT_COMPLETE_MASK 0xff + +enum gpu_arch { +GPU_ARCH_UNKNOWN =-1 , +GPU_ARCH_KEPLER =0 , +GPU_ARCH_MAXWELL_GEN1 , +GPU_ARCH_MAXWELL_GEN2 , +GPU_ARCH_PASCAL , +GPU_ARCH_PASCAL_10X , +GPU_ARCH_VOLTA , +GPU_ARCH_TURING , +GPU_ARCH_AMPERE , +GPU_ARCH_ADA , +GPU_ARCH_HOPPER , +}; + +enum falcon_type { +FALCON_TYPE_PMU_LEGACY =0 , +FALCON_TYPE_PMU , +FALCON_TYPE_GSP , +FALCON_TYPE_OFA , +}; + +struct falcon { +u32 base_page; +u32 dmactl; +u32 engine_reset; +u32 fbif_ctl; +u32 fbif_ctl2; +u32 fbif_transcfg; +u32 dmem_control_reg; +u32 dmem_data_reg; +bool no_outside_reset; +}; + +struct gpu_properties { +u32 pmc_enable_mask; +bool memory_clear_supported; +enum falcon_type falcon_type; +}; + +static const u32 verified_gpu_map[] = { +0x0e40a0a2 ,/* K520 */ +0x0e6000a1 ,/* GTX660 */ +0x0e63a0a1 ,/* K4000 */ +0x0f22d0a1 ,/* K80 */ +0x108000a1 ,/* GT635 */ +0x117010a2 ,/* GTX750 */ +0x117020a2 ,/* GTX745 */ +0x124320a1 ,/* M60 */ +0x130000a1 ,/* P100 */ +0x134000a1 ,/* P4 */ +0x132000a1 ,/* P40 */ +0x140000a1 ,/* V100 */ +0x164000a1 ,/* T4 */ +0xb77000a1 ,/* A16 */ +0x170000a1 ,/* A100 */ +0xb72000a1 ,/* A10 */ +0x180000a1 ,/* H100 */ +0x194000a1 ,/* L4 */ +0x192000a1 ,/* L40S */ +}; + +#define VERIFIED_GPU_MAP_SIZE ARRAY_SIZE(verified_gpu_map) + +static const struct gpu_properties gpu_properties_map[] = { + [GPU_ARCH_KEPLER ] = { + .pmc_enable_mask =NV_PMC_ENABLE_PWR |NV_PMC_ENABLE_HUB , + .memory_clear_supported = false, + .falcon_type =FALCON_TYPE_PMU_LEGACY , + }, + [GPU_ARCH_MAXWELL_GEN1 ] = { + .pmc_enable_mask =NV_PMC_ENABLE_PWR |NV_PMC_ENABLE_HUB , + .memory_clear_supported = false, + .falcon_type =FALCON_TYPE_PMU_LEGACY , + }, + [GPU_ARCH_MAXWELL_GEN2 ] = { + .pmc_enable_mask =NV_PMC_ENABLE_PWR , + .memory_clear_supported = false, + .falcon_type =FALCON_TYPE_PMU , + }, + [GPU_ARCH_PASCAL ] = { + .pmc_enable_mask =NV_PMC_ENABLE_PWR , + .memory_clear_supported = false, + .falcon_type =FALCON_TYPE_PMU , + }, + [GPU_ARCH_PASCAL_10X ] = { + .pmc_enable_mask =0 , + .memory_clear_supported = false, + .falcon_type =FALCON_TYPE_PMU , + }, + [GPU_ARCH_VOLTA ] = { + .pmc_enable_mask =0 , + .memory_clear_supported = false, + .falcon_type =FALCON_TYPE_GSP , + }, + [GPU_ARCH_TURING ] = { + .pmc_enable_mask =0 , + .memory_clear_supported = true, + .falcon_type =FALCON_TYPE_GSP , + }, + [GPU_ARCH_AMPERE ] = { + .pmc_enable_mask =0 , + .memory_clear_supported = true, + .falcon_type =FALCON_TYPE_GSP , + }, + [GPU_ARCH_ADA ] = { + .pmc_enable_mask =0 , + .memory_clear_supported = true, + .falcon_type =FALCON_TYPE_PMU , + }, + [GPU_ARCH_HOPPER ] = { + .pmc_enable_mask =0 , + .memory_clear_supported = true, + .falcon_type =FALCON_TYPE_OFA , + }, +}; + +static const struct falcon falcon_map[] = { + [FALCON_TYPE_PMU_LEGACY ] = { + .base_page =NV_PPWR_FALCON_BASE , + .dmactl =NV_PPWR_FALCON_BASE +NV_FALCON_DMACTL_OFFSET , + .engine_reset =NV_PPWR_FALCON_BASE +NV_FALCON_ENGINE_RESET_OFFSET , + .fbif_ctl =NV_PPWR_FALCON_BASE +NV_PMU_LEGACY_FBIF_CTL_OFFSET , + .fbif_ctl2 =NV_PPWR_FALCON_BASE + +NV_PMU_LEGACY_FBIF_CTL_OFFSET +NV_FBIF_CTL2_OFFSET , + .fbif_transcfg =NV_PPWR_FALCON_BASE +NV_PMU_LEGACY_FBIF_TRANSCFG_OFFSET , + .dmem_control_reg =NV_PPWR_FALCON_BASE +NV_FALCON_DMEMC_OFFSET , + .dmem_data_reg =NV_PPWR_FALCON_BASE +NV_FALCON_DMEMD_OFFSET , + .no_outside_reset = false, + }, + [FALCON_TYPE_PMU ] = { + .base_page =NV_PPWR_FALCON_BASE , + .dmactl =NV_PPWR_FALCON_BASE +NV_FALCON_DMACTL_OFFSET , + .engine_reset =NV_PPWR_FALCON_BASE +NV_FALCON_ENGINE_RESET_OFFSET , + .fbif_ctl =NV_PPWR_FALCON_BASE +NV_PMU_FBIF_CTL_OFFSET , + .fbif_ctl2 =NV_PPWR_FALCON_BASE +NV_PMU_FBIF_CTL_OFFSET +NV_FBIF_CTL2_OFFSET , + .fbif_transcfg =NV_PPWR_FALCON_BASE +NV_PMU_FBIF_TRANSCFG_OFFSET , + .dmem_control_reg =NV_PPWR_FALCON_BASE +NV_FALCON_DMEMC_OFFSET , + .dmem_data_reg =NV_PPWR_FALCON_BASE +NV_FALCON_DMEMD_OFFSET , + .no_outside_reset = false, + }, + [FALCON_TYPE_GSP ] = { + .base_page =NV_PGSP_FALCON_BASE , + .dmactl =NV_PGSP_FALCON_BASE +NV_FALCON_DMACTL_OFFSET , + .engine_reset =NV_PGSP_FALCON_BASE +NV_FALCON_ENGINE_RESET_OFFSET , + .fbif_ctl =NV_PGSP_FALCON_BASE +NV_GSP_FBIF_CTL_OFFSET , + .fbif_ctl2 =NV_PGSP_FALCON_BASE +NV_GSP_FBIF_CTL_OFFSET +NV_FBIF_CTL2_OFFSET , + .fbif_transcfg =NV_PGSP_FALCON_BASE +NV_GSP_FBIF_TRANSCFG_OFFSET , + .dmem_control_reg =NV_PGSP_FALCON_BASE +NV_FALCON_DMEMC_OFFSET , + .dmem_data_reg =NV_PGSP_FALCON_BASE +NV_FALCON_DMEMD_OFFSET , + .no_outside_reset = false, + }, + [FALCON_TYPE_OFA ] = { + .base_page =NV_OFA_FALCON_BASE , + .dmactl =NV_OFA_FALCON_BASE +NV_FALCON_DMACTL_OFFSET , + .engine_reset =NV_OFA_FALCON_BASE +NV_FALCON_ENGINE_RESET_OFFSET , + .fbif_ctl =NV_OFA_FALCON_BASE +NV_OFA_FBIF_CTL_OFFSET , + .fbif_ctl2 =NV_OFA_FALCON_BASE +NV_OFA_FBIF_CTL_OFFSET +NV_FBIF_CTL2_OFFSET , + .fbif_transcfg =NV_OFA_FALCON_BASE +NV_OFA_FBIF_TRANSCFG_OFFSET , + .dmem_control_reg =NV_OFA_FALCON_BASE +NV_FALCON_DMEMC_OFFSET , + .dmem_data_reg =NV_OFA_FALCON_BASE +NV_FALCON_DMEMD_OFFSET , + .no_outside_reset = true, + }, +}; + +#endif /* _NV_FALCON_HW_H_ */
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +755 -0
755 lines not on this page · raw message
tools/testing/selftests/vfio/lib/libvfio.mk +2 -0
@@ -14,6 +14,8 @@ LIBVFIO_C += drivers/ioat/ioat.c LIBVFIO_C += drivers/dsa/dsa.c endif +LIBVFIO_C += drivers/nv_falcon/nv_falcon.c + LIBVFIO_OUTPUT := $(OUTPUT)/libvfio LIBVFIO_O := $(patsubst %.c, $(LIBVFIO_OUTPUT)/%.o, $(LIBVFIO_C))
tools/testing/selftests/vfio/lib/vfio_pci_driver.c +3 -0
@@ -7,11 +7,14 @@ extern struct vfio_pci_driver_ops dsa_ops;extern struct vfio_pci_driver_ops ioat_ops;#endif +extern struct vfio_pci_driver_ops nv_falcon_ops; +static struct vfio_pci_driver_ops *driver_ops[] = { #ifdef __x86_64__ &dsa_ops, &ioat_ops, #endif + &nv_falcon_ops, };void vfio_pci_driver_probe (struct vfio_pci_device *device)
Signature · 1 line
2.43.0
David Matlack
maintainerRe: [PATCH v12 4/4] selftests/vfio: Add NVIDIA Falcon driver for DMA testing
Quoted 12 lines · Rubin Du
Add a new VFIO PCI driver for NVIDIA GPUs that enables DMA testing via the Falcon (Fast Logic Controller) microcontrollers. This driver extracts and adapts the DMA test functionality from NVIDIA's gpu-admin-tools project and integrates it into the existing VFIO selftest framework.
Falcons are general-purpose microcontrollers present on NVIDIA GPUs that can perform DMA operations between system memory and device memory. By leveraging Falcon DMA, this driver allows NVIDIA GPUs to be tested alongside Intel IOAT and DSA devices using the same selftest infrastructure.
Quoted 8 lines
The driver is named '
nv_falcon' to reflect that it specifically controls the Falcon microcontrollers for DMA operations, rather than exposing general GPU functionality.Reference implementation:
https://github.com/NVIDIA/gpu-admin-toolsSigned-off-by Rubin Du <[email protected]>
Will anyone from Nvidia be able to help review the correctness of the driver?
Quoted 20 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +20
-0+static int gpu_poll_register (struct vfio_pci_device *device, +const char *name,u32 offset, +u32 expected,u32 mask,u32 timeout_ms) +{ +struct gpu_device *gpu =to_gpu_device (device); +struct timespec start, now; +u64 elapsed_ms; +u32 value; + +clock_gettime (CLOCK_MONOTONIC , &start); + +for (;;) { + value =gpu_read32 (gpu, offset); +if ((value & mask) == expected) +return 0 ; + +clock_gettime (CLOCK_MONOTONIC , &now); + elapsed_ms = (now.tv_sec - start.tv_sec) *1000 + + (now.tv_nsec - start.tv_nsec) /1000000 ; +
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c line 112
Quoted 10 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +10
-0+if (elapsed_ms >= timeout_ms) +break ; + +usleep (1000 ); + } + +dev_err (device, +"Timeout polling %s (0x%x): value=0x%x expected=0x%x mask=0x%x after %llu ms\n" , + name, offset, value, expected, mask, + (unsigned long long )elapsed_ms);
nit: You can replace ll with l in the format string and drop the cast to unsigned long long.
We only support VFIO selftests on 64-bit architectures, and that matches what existing printfs for u64 use in VFIO selftests.
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c line 372
Quoted 11 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +11
-0+static bool fsp_check_ofa_dma_support (struct vfio_pci_device *device) +{ +struct gpu_device *gpu =to_gpu_device (device); +u32 val =gpu_read32 (gpu,NV_OFA_DMA_SUPPORT_CHECK_REG ); + +return (val >>16 ) !=0xbadf ; +} + +static int size_to_dma_encoding (u64 size) +{ + size =min_t (u64, size,NV_FALCON_DMA_MAX_TRANSFER_SIZE );
It should be impossible for size to be greater than NV_FALCON_DMA_MAX_TRANSFER_SIZE. This should be dropped or converted into a VFIO_ASSERT_LE().
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c line 377
Quoted 5 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +5
-0+ +if (!size || (size &0x3 )) +return -EINVAL ; + +return ffs (size) -3 ;
Sashiko pointed out that this can lead to partial memcpys:
. If a non-power-of-two size is passed (for example, 24 bytes), ffs(size) will . return the lowest set bit (bit 4, yielding an encoding for 8 bytes). .
. Because nv_gpu_memcpy_wait() performs exactly one chunk transfer and does not . loop over the remainder, could this silently drop the remaining bytes and . cause a partial data copy? Should this check if the size is a power of 2, or . should the caller loop to handle remainders?
https://sashiko.dev/#/patchset/20260403234444.350867-1-rubind%40nvidia.com?part=4
I think this nuance needs to be handled within the nv_falcon driver. vfio_pci_driver_memcpy_start() just guarantees that size <= NV_FALCON_DMA_MAX_TRANSFER_SIZE.
Perhaps this is why you had the loop in an earlier version of the patchset, in which case it was my mistake to ask you to remove it!
When you add the loop back please add a comment to the loop to explain that it is necessary since the region needs to be sliced up into power-of-2 sizes for Falcon.
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c line 755
Quoted 8 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +8
-0+const struct vfio_pci_driver_ops nv_falcon_ops = { + .name ="nv_falcon" , + .probe = nv_gpu_probe, + .init = nv_gpu_init, + .remove = nv_gpu_remove, + .memcpy_start = nv_gpu_memcpy_start, + .memcpy_wait = nv_gpu_memcpy_wait, +};
Any particular reason these functions are named nv_gpu_*() instead of nv_falcon_*()
Alex Williamson
maintainerRe: [PATCH v12 4/4] selftests/vfio: Add NVIDIA Falcon driver for DMA testing
Quoted 17 lines · On Mon, 6 Apr 2026 23:46:53 +0000 David Matlack <[email protected]> wrote:
Quoted 16 lines · Rubin Du
Add a new VFIO PCI driver for NVIDIA GPUs that enables DMA testing via the Falcon (Fast Logic Controller) microcontrollers. This driver extracts and adapts the DMA test functionality from NVIDIA's gpu-admin-tools project and integrates it into the existing VFIO selftest framework.
Falcons are general-purpose microcontrollers present on NVIDIA GPUs that can perform DMA operations between system memory and device memory. By leveraging Falcon DMA, this driver allows NVIDIA GPUs to be tested alongside Intel IOAT and DSA devices using the same selftest infrastructure.
The driver is named '
nv_falcon' to reflect that it specifically controls the Falcon microcontrollers for DMA operations, rather than exposing general GPU functionality.
Quoted 7 lines
Quoted 4 lines
Reference implementation:
https://github.com/NVIDIA/gpu-admin-toolsSigned-off-by Rubin Du <[email protected]>Will anyone from Nvidia be able to help review the correctness of the driver?
You can tell by the versioning snafu that we've seen a bunch of versions of this internally, so we think it's correct. We also have the reference implementation in the above link if anyone else wants to compare.
Quoted 34 lines
Quoted 20 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +20
-0+static int gpu_poll_register (struct vfio_pci_device *device, +const char *name,u32 offset, +u32 expected,u32 mask,u32 timeout_ms) +{ +struct gpu_device *gpu =to_gpu_device (device); +struct timespec start, now; +u64 elapsed_ms; +u32 value; + +clock_gettime (CLOCK_MONOTONIC , &start); + +for (;;) { + value =gpu_read32 (gpu, offset); +if ((value & mask) == expected) +return 0 ; + +clock_gettime (CLOCK_MONOTONIC , &now); + elapsed_ms = (now.tv_sec - start.tv_sec) *1000 + + (now.tv_nsec - start.tv_nsec) /1000000 ; +tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c line 112
Quoted 10 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +10
-0+if (elapsed_ms >= timeout_ms) +break ; + +usleep (1000 ); + } + +dev_err (device, +"Timeout polling %s (0x%x): value=0x%x expected=0x%x mask=0x%x after %llu ms\n" , + name, offset, value, expected, mask, + (unsigned long long )elapsed_ms);nit: You can replace ll with l in the format string and drop the cast to unsigned long long.
Quoted 2 lines
We only support VFIO selftests on 64-bit architectures, and that matches what existing printfs for u64 use in VFIO selftests.
Yup
Quoted 7 lines
Quoted 7 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +7
-0+static bool fsp_check_ofa_dma_support (struct vfio_pci_device *device) +{ +struct gpu_device *gpu =to_gpu_device (device); +u32 val =gpu_read32 (gpu,NV_OFA_DMA_SUPPORT_CHECK_REG ); + +return (val >>16 ) !=0xbadf ; +}
Quoted 8 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c line 372
Quoted 4 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +4
-0+ +static int size_to_dma_encoding (u64 size) +{ + size =min_t (u64, size,NV_FALCON_DMA_MAX_TRANSFER_SIZE );It should be impossible for size to be greater than
NV_FALCON_DMA_MAX_TRANSFER_SIZE. This should be dropped or converted into aVFIO_ASSERT_LE().
Ok, I think the below tests can also become asserts.
Quoted 22 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c line 377
Quoted 5 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +5
-0+ +if (!size || (size &0x3 )) +return -EINVAL ; + +return ffs (size) -3 ;Sashiko pointed out that this can lead to partial memcpys:
. If a non-power-of-two size is passed (for example, 24 bytes), ffs(size) will . return the lowest set bit (bit 4, yielding an encoding for 8 bytes). .
. Becausenv_gpu_memcpy_wait()performs exactly one chunk transfer and does not . loop over the remainder, could this silently drop the remaining bytes and . cause a partial data copy? Should this check if the size is a power of 2, or . should the caller loop to handle remainders?https://sashiko.dev/#/patchset/20260403234444.350867-1-rubind%40nvidia.com?part=4
I think this nuance needs to be handled within the
nv_falcondriver.vfio_pci_driver_memcpy_start()just guarantees that size <=NV_FALCON_DMA_MAX_TRANSFER_SIZE.
Quoted 6 lines
Perhaps this is why you had the loop in an earlier version of the patchset, in which case it was my mistake to ask you to remove it!
When you add the loop back please add a comment to the loop to explain that it is necessary since the region needs to be sliced up into power-of-2 sizes for Falcon.
Yes, shouldn't have been removed. We can't do arbitrary sizes, only power-of-2 down to 4-bytes. We can make this more self documenting and assert on memcpy_start for the size alignment requirement.
Quoted 11 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c line 755
Quoted 8 lines
tools/testing/selftests/vfio/lib/drivers/nv_falcon/nv_falcon.c new file +8
-0+const struct vfio_pci_driver_ops nv_falcon_ops = { + .name ="nv_falcon" , + .probe = nv_gpu_probe, + .init = nv_gpu_init, + .remove = nv_gpu_remove, + .memcpy_start = nv_gpu_memcpy_start, + .memcpy_wait = nv_gpu_memcpy_wait, +};Any particular reason these functions are named nv_gpu_*() instead of nv_falcon_*()
Yes, these can be made more consistent. Thanks,
Alex