GVM User Suite
User tools for the GVM open source project.
Functions | Variables
manager.c File Reference
#include <gpu/nvidia/device.h>
#include <gpu/nvidia/manager.h>
#include <gpu/nvidia/resman/api.h>
#include <gpu/nvidia/resman/classes.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
Include dependency graph for manager.c:

Go to the source code of this file.

Functions

static uint32_t compose_manager_id (uint32_t client, uint32_t gpu_id, uint32_t handle)
 Inline function to create device ids. More...
 
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...
 

Variables

static const char SIGN [128]
 Hardcoded signature. More...
 

Function Documentation

◆ compose_manager_id()

static uint32_t compose_manager_id ( uint32_t  client,
uint32_t  gpu_id,
uint32_t  handle 
)
inlinestatic

Inline function to create device ids.

Definition at line 42 of file manager.c.

◆ create_nv_mgr()

struct NvMdev create_nv_mgr ( )

Creates a NVIDIA manager object.

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.

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:

Variable Documentation

◆ SIGN

const char SIGN[128]
static
Initial value:
= {
0x47, 0xab, 0x8d, 0x39, 0xb3, 0xaf, 0xd0, 0x2c, 0x79, 0x6f, 0xd0, 0xc7, 0x7a, 0x78, 0x84, 0x68,
0xf0, 0x9b, 0x69, 0xe8, 0xb6, 0xc2, 0xc5, 0x05, 0x59, 0x97, 0xf2, 0x0f, 0x77, 0x3a, 0x94, 0x91,
0x92, 0x56, 0x2d, 0xf0, 0x4f, 0xae, 0xa6, 0x4d, 0xcc, 0x51, 0x32, 0x17, 0xe5, 0xda, 0xf0, 0x94,
0x42, 0x93, 0x51, 0x05, 0x49, 0xe9, 0x61, 0xfd, 0x22, 0x24, 0x6c, 0x8f, 0x88, 0xe3, 0x16, 0x63,
0x91, 0x04, 0x20, 0x6a, 0xea, 0x27, 0xc4, 0xe7, 0x11, 0xfc, 0x88, 0x24, 0xb9, 0xaa, 0x1b, 0x85,
0xc5, 0x1a, 0x48, 0x7f, 0x99, 0xf4, 0x8e, 0xda, 0x55, 0x2b, 0x4a, 0xfe, 0x48, 0x79, 0x75, 0x78,
0x48, 0x16, 0x02, 0x0f, 0x22, 0xc2, 0x9d, 0x20, 0xfa, 0xbb, 0x21, 0x39, 0x56, 0x78, 0xd8, 0x80,
0x96, 0x5c, 0x5c, 0xe4, 0x7c, 0xad, 0x87, 0x24, 0x20, 0x70, 0xad, 0x63, 0x84, 0x96, 0x92, 0x3f
}

Hardcoded signature.

Definition at line 30 of file manager.c.