GVM User Suite
User tools for the GVM open source project.
Functions
manager.h File Reference
#include <gpu/mdev.h>
#include <gpu/nvidia/resources.h>
#include <stdint.h>
Include dependency graph for manager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct NvMdev create_nv_mgr ()
 Creates a NVIDIA manager object. More...
 
void free_nv_mgr (struct NvMdev *mgr)
 Deletes a NVIDIA manager object. More...
 
void create_nv_mgr_mdevs (struct NvMdev *mgr, struct Gpu *limited, size_t gpu_size, struct MDevRequest *requested, size_t mdev_size)
 Creates necessary mediated devices on GPUs. More...
 
void register_nv_mgr_mdevs (struct NvMdev *mgr)
 Registers mdevs on the OS. More...
 

Function Documentation

◆ create_nv_mgr()

struct NvMdev create_nv_mgr ( )

Creates a NVIDIA manager object.

This function initalizes the manager object for the NVIDIA GPU.

Side Effect:

File System Side Effect: Can potentially create a few /dev files.

File System Side Effect: Opens /dev/nvidiactl.

File System Side Effect: Opens /dev/nvidiad for different GPUs.

RM Side Effect: Creates a RM Client.

RM Side Effect: Attaches a GPU to /dev/nvidiad.

RM Side Effect: Creates a RM Device Id.

RM Side Effect: Creates a RM Sub Device Id.

RM Side Effect: Creates a mdev configurator id.

Returns
A manager for the NVIDIA system.
Todo:
Use proper logging.

Definition at line 42 of file manager.c.

Here is the caller graph for this function:

◆ create_nv_mgr_mdevs()

void create_nv_mgr_mdevs ( struct NvMdev mgr,
struct Gpu limited,
size_t  gpu_size,
struct MDevRequest requested,
size_t  mdev_size 
)

Creates necessary mediated devices on GPUs.

Creates mediated devices on the devices.

Side Effect:
RM Side Effect: Creates mdevs on a requested GPU.
Parameters
mgr- Pointer to the manager for the NVIDIA driver.
limited- GPUs to limit the requested drivers on.
gpu_size- Size of the limited list.
requested- Requested MDevs to use.
mdev_size- Size of the requested list.

Definition at line 184 of file manager.c.

Here is the caller graph for this function:

◆ free_nv_mgr()

void free_nv_mgr ( struct NvMdev mgr)

Deletes a NVIDIA manager object.

This function destroys the manager object for the NVIDIA GPU.

Side Effect:

RM Side Effect: Deletes a RM Client.

RM Side Effect: DeAttaches a GPU from /dev/nvidiad.

RM Side Effect: Deletes a RM Device Id.

RM Side Effect: Deletes a RM Sub Device Id.

RM Side Effect: Deletes a mdev configurator id.

Parameters
mgr- Pointer to the manager structure to free.
Todo:
Use proper logging.

Definition at line 158 of file manager.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_nv_mgr_mdevs()

void register_nv_mgr_mdevs ( struct NvMdev mgr)

Registers mdevs on the OS.

This command actually registers the MDevs in the Operating System.

Side Effect:
RM Side Effect: Creates mdevs in the OS.
Parameters
mgr- Manager to register the MDevs for.

Definition at line 267 of file manager.c.

Here is the call graph for this function:
Here is the caller graph for this function: