tpuproxy

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0, MIT Imports: 25 Imported by: 0

Documentation

Overview

Package tpuproxy implements proxying for TPU devices.

Index

Constants

View Source
const (
	// VFIO_MINOR is the VFIO minor number from include/linux/miscdevice.h.
	VFIO_MINOR = 196
	// VFIOPath is the path to a VFIO device, it is ususally used to
	// construct a VFIO container.
	VFIOPath = "/dev/vfio/vfio"
)

Variables

This section is empty.

Functions

func Filters

func Filters() seccomp.SyscallRules

Filters returns seccomp-bpf filters for this package.

func IOCTLInvoke

func IOCTLInvoke[Cmd, Arg constraints.Integer](hostFd int32, cmd Cmd, arg Arg) (uintptr, error)

IOCTLInvoke makes ioctl syscalls with the arg of the integer type.

func IOCTLInvokePtrArg

func IOCTLInvokePtrArg[Cmd constraints.Integer, Params any](hostFd int32, cmd Cmd, params *Params) (uintptr, error)

IOCTLInvokePtrArg makes ioctl syscalls with the command of the integer type and the pointer to any given params.

func RegisterTPUDevice

func RegisterTPUDevice(vfsObj *vfs.VirtualFilesystem, minor uint32) error

RegisterTPUDevice registers devices implemented by this package in vfsObj.

func RegisterVfioDevice

func RegisterVfioDevice(vfsObj *vfs.VirtualFilesystem) error

RegisterVfioDevice registers VFIO devices that are implemented by this pacakge in vfsObj.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL