Documentation ¶
Overview ¶
Package nvproxy implements proxying for the Nvidia GPU Linux kernel driver: https://github.com/NVIDIA/open-gpu-kernel-modules.
Supported Nvidia GPUs: T4, L4, A100, A10G and H100.
Index ¶
- func ExpectedDriverChecksum(version DriverVersion) (string, bool)
- func Filters(enabledCaps nvconf.DriverCaps) seccomp.SyscallRules
- func ForEachSupportDriver(f func(version DriverVersion, checksum string))
- func HostDriverVersion() (string, error)
- func Init()
- func Register(vfsObj *vfs.VirtualFilesystem, versionStr string, driverCaps nvconf.DriverCaps, ...) error
- func SupportedIoctls(version DriverVersion) (frontendIoctls map[uint32]struct{}, uvmIoctls map[uint32]struct{}, ...)
- type DriverStruct
- type DriverStructName
- type DriverVersion
- func (v DriverVersion) Equals(other DriverVersion) bool
- func (v *DriverVersion) StateFields() []string
- func (v *DriverVersion) StateLoad(ctx context.Context, stateSourceObject state.Source)
- func (v *DriverVersion) StateSave(stateSinkObject state.Sink)
- func (v *DriverVersion) StateTypeName() string
- func (v DriverVersion) String() string
- type NvidiaDeviceFD
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectedDriverChecksum ¶
func ExpectedDriverChecksum(version DriverVersion) (string, bool)
ExpectedDriverChecksum returns the expected checksum for a given version. Precondition: Init() must have been called.
func Filters ¶
func Filters(enabledCaps nvconf.DriverCaps) seccomp.SyscallRules
Filters returns seccomp-bpf filters for this package when using the given set of capabilities.
func ForEachSupportDriver ¶
func ForEachSupportDriver(f func(version DriverVersion, checksum string))
ForEachSupportDriver calls f on all supported drivers. Precondition: Init() must have been called.
func HostDriverVersion ¶
HostDriverVersion returns the version of the host Nvidia driver.
func Register ¶
func Register(vfsObj *vfs.VirtualFilesystem, versionStr string, driverCaps nvconf.DriverCaps, uvmDevMajor uint32) error
Register registers all devices implemented by this package in vfsObj.
func SupportedIoctls ¶
func SupportedIoctls(version DriverVersion) (frontendIoctls map[uint32]struct{}, uvmIoctls map[uint32]struct{}, controlCmds map[uint32]struct{}, allocClasses map[uint32]struct{}, ok bool)
SupportedIoctls returns the ioctl numbers that are supported by nvproxy at a given version.
Types ¶
type DriverStruct ¶
type DriverStruct struct { Name DriverStructName Type reflect.Type }
DriverStruct ties an nvproxy struct type to its corresponding driver struct name.
func SupportedStructTypes ¶
func SupportedStructTypes(version DriverVersion) ([]DriverStruct, bool)
SupportedStructTypes returns the list of struct types supported by the given driver version. It merges the frontend, uvm, control, and allocation names into one slice.
type DriverStructName ¶
type DriverStructName = string
DriverStructName is the name of a struct used by the Nvidia driver.
func SupportedStructNames ¶
func SupportedStructNames(version DriverVersion) ([]DriverStructName, bool)
SupportedStructNames returns the list of struct names supported by the given driver version. It merges the frontend, uvm, control, and allocation names into one slice.
type DriverVersion ¶
type DriverVersion struct {
// contains filtered or unexported fields
}
DriverVersion represents a NVIDIA driver version patch release.
+stateify savable
func DriverVersionFrom ¶
func DriverVersionFrom(version string) (DriverVersion, error)
DriverVersionFrom returns a DriverVersion from a string.
func LatestDriver ¶
func LatestDriver() DriverVersion
LatestDriver returns the latest supported driver. Precondition: Init() must have been called.
func NewDriverVersion ¶
func NewDriverVersion(major, minor, patch int) DriverVersion
NewDriverVersion returns a new driver version.
func SupportedDrivers ¶
func SupportedDrivers() []DriverVersion
SupportedDrivers returns a list of all supported drivers. Precondition: Init() must have been called.
func (DriverVersion) Equals ¶
func (v DriverVersion) Equals(other DriverVersion) bool
Equals returns true if the two driver versions are equal.
func (*DriverVersion) StateFields ¶
func (v *DriverVersion) StateFields() []string
func (*DriverVersion) StateLoad ¶
func (v *DriverVersion) StateLoad(ctx context.Context, stateSourceObject state.Source)
+checklocksignore
func (*DriverVersion) StateSave ¶
func (v *DriverVersion) StateSave(stateSinkObject state.Sink)
+checklocksignore
func (*DriverVersion) StateTypeName ¶
func (v *DriverVersion) StateTypeName() string
func (DriverVersion) String ¶
func (v DriverVersion) String() string
type NvidiaDeviceFD ¶
type NvidiaDeviceFD interface {
IsNvidiaDeviceFD()
}
NvidiaDeviceFD is an interface that should be implemented by all vfs.FileDescriptionImpl of Nvidia devices.
Source Files ¶
- fds_mutex.go
- frontend.go
- frontend_mmap.go
- frontend_mmap_mutex.go
- frontend_mmap_unsafe.go
- frontend_unsafe.go
- handlers.go
- nvproxy.go
- nvproxy_impl_state_autogen.go
- nvproxy_state_autogen.go
- nvproxy_unsafe.go
- nvproxy_unsafe_state_autogen.go
- object.go
- object_free_list.go
- objs_mutex.go
- save_restore.go
- save_restore_impl.go
- seccomp_filters.go
- uvm.go
- uvm_mmap.go
- uvm_unsafe.go
- version.go