Fix NV_MEMORY_FABRIC for 535.43.02+ drivers.

Updates #9372

PiperOrigin-RevId: 577494512
This commit is contained in:
Ayush Ranjan
2023-10-28 12:44:38 -07:00
committed by gVisor bot
parent 1918283b03
commit fd9845ccea
2 changed files with 14 additions and 0 deletions
+13
View File
@@ -232,6 +232,19 @@ type NV00F8_ALLOCATION_PARAMETERS struct {
Map nv00f8Map
}
// NV00F8_ALLOCATION_PARAMETERS_V535 is the updated version of
// NV00F8_ALLOCATION_PARAMETERS since 535.43.02.
//
// +marshal
type NV00F8_ALLOCATION_PARAMETERS_V535 struct {
Alignment uint64
AllocSize uint64
PageSize uint64
AllocFlags uint32
_ uint32
Map nv00f8Map
}
// NV_CONFIDENTIAL_COMPUTE_ALLOC_PARAMS is the alloc param type for
// NV_CONFIDENTIAL_COMPUTE, from src/common/sdk/nvidia/inc/class/clcb33.h.
//
+1
View File
@@ -316,6 +316,7 @@ func Init() {
abi.useRmAllocParamsV535 = true
abi.controlCmd[nvgpu.NV_CONF_COMPUTE_CTRL_CMD_SYSTEM_GET_CAPABILITIES] = rmControlSimple
abi.allocationClass[nvgpu.NV_CONFIDENTIAL_COMPUTE] = rmAllocSimple[nvgpu.NV_CONFIDENTIAL_COMPUTE_ALLOC_PARAMS]
abi.allocationClass[nvgpu.NV_MEMORY_FABRIC] = rmAllocSimple[nvgpu.NV00F8_ALLOCATION_PARAMETERS_V535]
abi.uvmIoctl[nvgpu.UVM_MM_INITIALIZE] = uvmMMInitialize
return abi
}