#include <gpu/nvidia/device.h>
#include <gpu/nvidia/resman/api.h>
#include <gpu/nvidia/resman/classes.h>
#include <gpu/nvidia/resman/types.h>
#include <gvm/nvidia/init.h>
#include <gvm/nvidia/manager.h>
#include <sys/select.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
Go to the source code of this file.
◆ compose_vm_id()
static uint32_t compose_vm_id |
( |
uint32_t |
t, |
|
|
uint32_t |
i |
|
) |
| |
|
inlinestatic |
Inline function to create VM specific Event IDs.
Definition at line 37 of file manager.c.
◆ event_init()
static int event_init |
( |
int |
ctl_fd, |
|
|
struct NvResource * |
res, |
|
|
uint32_t |
event, |
|
|
uint32_t |
notify, |
|
|
uint32_t |
flags |
|
) |
| |
|
static |
Code to initialize events for the VM manager.
This makes a event handler for the VM manager.
- Parameters
-
ctl_fd | - Control file descriptor. |
res | - Parent resource on the base of the system. |
event | - Event id. |
notify | - Notification settings. |
flags | - Flags to use for the event. |
- Returns
- Returns a file descriptor to associate to the event.
Definition at line 53 of file manager.c.
◆ handle_vm_start()
void handle_vm_start |
( |
struct VmMgr * |
mgr, |
|
|
struct NvMdev * |
mdev_mgr |
|
) |
| |
Handles a start request.
- Todo:
- Proper logging.
Definition at line 119 of file manager.c.
◆ init_nv_vm_mgr()
Initializes a NVIDIA VM manager to connect to a VM.
- Todo:
- Proper logging.
Definition at line 53 of file manager.c.
◆ start_vm()
void start_vm |
( |
struct VmMgr * |
mgr, |
|
|
struct NvMdev * |
mdev_mgr |
|
) |
| |
Connects the VM to the user program.
- Todo:
- Proper logging.
Definition at line 143 of file manager.c.
◆ RM_EVENT
const uint32_t RM_EVENT = 4 |