mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add NV_MEMORY_FABRIC to nvproxy.
Fixes #9372 PiperOrigin-RevId: 567816690
This commit is contained in:
@@ -23,6 +23,7 @@ const (
|
||||
NV01_MEMORY_SYSTEM_OS_DESCRIPTOR = 0x00000071
|
||||
NV01_EVENT_OS_EVENT = 0x00000079
|
||||
NV01_DEVICE_0 = 0x00000080
|
||||
NV_MEMORY_FABRIC = 0x000000f8
|
||||
NV20_SUBDEVICE_0 = 0x00002080
|
||||
NV50_THIRD_PARTY_P2P = 0x0000503c
|
||||
GT200_DEBUGGER = 0x000083de
|
||||
@@ -220,3 +221,22 @@ type NV_HOPPER_USERMODE_A_PARAMS struct {
|
||||
Bar1Mapping uint8
|
||||
Priv uint8
|
||||
}
|
||||
|
||||
// +marshal
|
||||
type nv00f8Map struct {
|
||||
offset uint64
|
||||
hVidMem Handle
|
||||
flags uint32
|
||||
}
|
||||
|
||||
// NV00F8_ALLOCATION_PARAMETERS is the alloc param type for NV_MEMORY_FABRIC,
|
||||
// from src/common/sdk/nvidia/inc/class/cl00f8.h
|
||||
//
|
||||
// +marshal
|
||||
type NV00F8_ALLOCATION_PARAMETERS struct {
|
||||
Alignment uint64
|
||||
AllocSize uint64
|
||||
PageSize uint32
|
||||
AllocFlags uint32
|
||||
Map nv00f8Map
|
||||
}
|
||||
|
||||
@@ -782,6 +782,8 @@ func rmAlloc(fi *frontendIoctlState) (uintptr, error) {
|
||||
return rmAllocSimple[nvgpu.NV_HOPPER_USERMODE_A_PARAMS](fi, &ioctlParams, isNVOS64)
|
||||
case nvgpu.GF100_SUBDEVICE_MASTER, nvgpu.VOLTA_USERMODE_A, nvgpu.TURING_USERMODE_A:
|
||||
return rmAllocNoParams(fi, &ioctlParams, isNVOS64)
|
||||
case nvgpu.NV_MEMORY_FABRIC:
|
||||
return rmAllocSimple[nvgpu.NV00F8_ALLOCATION_PARAMETERS](fi, &ioctlParams, isNVOS64)
|
||||
default:
|
||||
fi.ctx.Warningf("nvproxy: unknown allocation class %#08x", ioctlParams.HClass)
|
||||
return 0, linuxerr.EINVAL
|
||||
|
||||
Reference in New Issue
Block a user