diff --git a/pkg/abi/nvgpu/classes.go b/pkg/abi/nvgpu/classes.go index bdf2b56027..a5cc771417 100644 --- a/pkg/abi/nvgpu/classes.go +++ b/pkg/abi/nvgpu/classes.go @@ -82,19 +82,28 @@ const ( TURING_DMA_COPY_A = 0x0000c5b5 TURING_COMPUTE_A = 0x0000c5c0 HOPPER_USERMODE_A = 0x0000c661 + BLACKWELL_USERMODE_A = 0x0000c761 AMPERE_A = 0x0000c697 AMPERE_DMA_COPY_A = 0x0000c6b5 AMPERE_COMPUTE_A = 0x0000c6c0 AMPERE_DMA_COPY_B = 0x0000c7b5 AMPERE_COMPUTE_B = 0x0000c7c0 HOPPER_CHANNEL_GPFIFO_A = 0x0000c86f + BLACKWELL_CHANNEL_GPFIFO_A = 0x0000c96f + BLACKWELL_CHANNEL_GPFIFO_B = 0x0000ca6f HOPPER_DMA_COPY_A = 0x0000c8b5 + BLACKWELL_DMA_COPY_A = 0x0000C9B5 ADA_A = 0x0000c997 ADA_COMPUTE_A = 0x0000c9c0 NV_CONFIDENTIAL_COMPUTE = 0x0000cb33 HOPPER_A = 0x0000cb97 HOPPER_SEC2_WORK_LAUNCH_A = 0x0000cba2 HOPPER_COMPUTE_A = 0x0000cbc0 + BLACKWELL_A = 0x0000cd97 + BLACKWELL_COMPUTE_A = 0x0000cdc0 + BLACKWELL_B = 0x0000ce97 + BLACKWELL_COMPUTE_B = 0x0000cec0 + BLACKWELL_INLINE_TO_MEMORY_A = 0x0000cd40 ) // From src/common/sdk/nvidia/inc/class/cl0000.h: diff --git a/pkg/sentry/devices/nvproxy/version.go b/pkg/sentry/devices/nvproxy/version.go index 67ce65bdfd..b465b28ae5 100644 --- a/pkg/sentry/devices/nvproxy/version.go +++ b/pkg/sentry/devices/nvproxy/version.go @@ -763,10 +763,26 @@ func Init() { v560_28_03 := func() *driverABI { abi := v555_42_02() abi.allocationClass[nvgpu.NVCDB0_VIDEO_DECODER] = allocHandler(rmAllocSimple[nvgpu.NV_BSP_ALLOCATION_PARAMETERS], nvconf.CapVideo) + // Blackwell Support starts in the 560 branch. + abi.allocationClass[nvgpu.BLACKWELL_USERMODE_A] = allocHandler(rmAllocSimple[nvgpu.NV_HOPPER_USERMODE_A_PARAMS], compUtil) + abi.allocationClass[nvgpu.BLACKWELL_DMA_COPY_A] = allocHandler(rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS], compUtil) + abi.allocationClass[nvgpu.BLACKWELL_A] = allocHandler(rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS], nvconf.CapGraphics) + abi.allocationClass[nvgpu.BLACKWELL_COMPUTE_A] = allocHandler(rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS], compUtil) + abi.allocationClass[nvgpu.BLACKWELL_B] = allocHandler(rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS], nvconf.CapGraphics) + abi.allocationClass[nvgpu.BLACKWELL_COMPUTE_B] = allocHandler(rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS], compUtil) + + // #define BLACKWELL_CHANNEL_GPFIFO_B (0x0000ca6f) prevStructs := abi.getStructs abi.getStructs = func() *driverABIStructs { structs := prevStructs() structs.allocationStructs[nvgpu.NVCDB0_VIDEO_DECODER] = driverStructs(nvgpu.NV_BSP_ALLOCATION_PARAMETERS{}) + // Blackwell Support starts in the 570 branch. + structs.allocationStructs[nvgpu.BLACKWELL_USERMODE_A] = driverStructs(nvgpu.NV_HOPPER_USERMODE_A_PARAMS{}) + structs.allocationStructs[nvgpu.BLACKWELL_DMA_COPY_A] = driverStructs(nvgpu.NVB0B5_ALLOCATION_PARAMETERS{}) + structs.allocationStructs[nvgpu.BLACKWELL_A] = driverStructs(nvgpu.NV_GR_ALLOCATION_PARAMETERS{}) + structs.allocationStructs[nvgpu.BLACKWELL_COMPUTE_A] = driverStructs(nvgpu.NV_GR_ALLOCATION_PARAMETERS{}) + structs.allocationStructs[nvgpu.BLACKWELL_B] = driverStructs(nvgpu.NV_GR_ALLOCATION_PARAMETERS{}) + structs.allocationStructs[nvgpu.BLACKWELL_COMPUTE_B] = driverStructs(nvgpu.NV_GR_ALLOCATION_PARAMETERS{}) return structs } return abi @@ -780,6 +796,8 @@ func Init() { abi.allocationClass[nvgpu.TURING_CHANNEL_GPFIFO_A] = allocHandler(rmAllocChannelV570, compUtil) abi.allocationClass[nvgpu.AMPERE_CHANNEL_GPFIFO_A] = allocHandler(rmAllocChannelV570, compUtil) abi.allocationClass[nvgpu.HOPPER_CHANNEL_GPFIFO_A] = allocHandler(rmAllocChannelV570, compUtil) + abi.allocationClass[nvgpu.BLACKWELL_CHANNEL_GPFIFO_A] = allocHandler(rmAllocChannelV570, compUtil) + abi.allocationClass[nvgpu.BLACKWELL_CHANNEL_GPFIFO_B] = allocHandler(rmAllocChannelV570, compUtil) prevStructs := abi.getStructs abi.getStructs = func() *driverABIStructs { @@ -787,6 +805,8 @@ func Init() { structs.allocationStructs[nvgpu.TURING_CHANNEL_GPFIFO_A] = driverStructWithName(nvgpu.NV_CHANNEL_ALLOC_PARAMS_V570{}, "NV_CHANNEL_ALLOC_PARAMS") structs.allocationStructs[nvgpu.AMPERE_CHANNEL_GPFIFO_A] = driverStructWithName(nvgpu.NV_CHANNEL_ALLOC_PARAMS_V570{}, "NV_CHANNEL_ALLOC_PARAMS") structs.allocationStructs[nvgpu.HOPPER_CHANNEL_GPFIFO_A] = driverStructWithName(nvgpu.NV_CHANNEL_ALLOC_PARAMS_V570{}, "NV_CHANNEL_ALLOC_PARAMS") + structs.allocationStructs[nvgpu.BLACKWELL_CHANNEL_GPFIFO_A] = driverStructWithName(nvgpu.NV_CHANNEL_ALLOC_PARAMS_V570{}, "NV_CHANNEL_ALLOC_PARAMS") + structs.allocationStructs[nvgpu.BLACKWELL_CHANNEL_GPFIFO_B] = driverStructWithName(nvgpu.NV_CHANNEL_ALLOC_PARAMS_V570{}, "NV_CHANNEL_ALLOC_PARAMS") return structs } return abi