Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/include/vmm_dev.h
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | struct vm_readwrite_kernemu_device { | ||||
int vcpuid; | int vcpuid; | ||||
unsigned access_width : 3; | unsigned access_width : 3; | ||||
unsigned _unused : 29; | unsigned _unused : 29; | ||||
uint64_t gpa; | uint64_t gpa; | ||||
uint64_t value; | uint64_t value; | ||||
}; | }; | ||||
_Static_assert(sizeof(struct vm_readwrite_kernemu_device) == 24, "ABI"); | _Static_assert(sizeof(struct vm_readwrite_kernemu_device) == 24, "ABI"); | ||||
struct vm_acpi_device_info { | |||||
const char *path; | |||||
void *buffer; | |||||
size_t buffer_length; | |||||
enum vm_acpi_device_info_type type; | |||||
}; | |||||
enum { | enum { | ||||
/* general routines */ | /* general routines */ | ||||
IOCNUM_ABIVERS = 0, | IOCNUM_ABIVERS = 0, | ||||
IOCNUM_RUN = 1, | IOCNUM_RUN = 1, | ||||
IOCNUM_SET_CAPABILITY = 2, | IOCNUM_SET_CAPABILITY = 2, | ||||
IOCNUM_GET_CAPABILITY = 3, | IOCNUM_GET_CAPABILITY = 3, | ||||
IOCNUM_SUSPEND = 4, | IOCNUM_SUSPEND = 4, | ||||
IOCNUM_REINIT = 5, | IOCNUM_REINIT = 5, | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | enum { | ||||
IOCNUM_RESUME_CPU = 93, | IOCNUM_RESUME_CPU = 93, | ||||
/* RTC */ | /* RTC */ | ||||
IOCNUM_RTC_READ = 100, | IOCNUM_RTC_READ = 100, | ||||
IOCNUM_RTC_WRITE = 101, | IOCNUM_RTC_WRITE = 101, | ||||
IOCNUM_RTC_SETTIME = 102, | IOCNUM_RTC_SETTIME = 102, | ||||
IOCNUM_RTC_GETTIME = 103, | IOCNUM_RTC_GETTIME = 103, | ||||
/* ACPI */ | |||||
IOCNUM_GET_ACPI_DEVICE_INFO = 110, | |||||
/* checkpoint */ | /* checkpoint */ | ||||
IOCNUM_SNAPSHOT_REQ = 113, | IOCNUM_SNAPSHOT_REQ = 113, | ||||
IOCNUM_RESTORE_TIME = 115 | IOCNUM_RESTORE_TIME = 115 | ||||
}; | }; | ||||
#define VM_RUN \ | #define VM_RUN \ | ||||
_IOWR('v', IOCNUM_RUN, struct vm_run) | _IOWR('v', IOCNUM_RUN, struct vm_run) | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | |||||
#define VM_RTC_READ \ | #define VM_RTC_READ \ | ||||
_IOWR('v', IOCNUM_RTC_READ, struct vm_rtc_data) | _IOWR('v', IOCNUM_RTC_READ, struct vm_rtc_data) | ||||
#define VM_RTC_SETTIME \ | #define VM_RTC_SETTIME \ | ||||
_IOW('v', IOCNUM_RTC_SETTIME, struct vm_rtc_time) | _IOW('v', IOCNUM_RTC_SETTIME, struct vm_rtc_time) | ||||
#define VM_RTC_GETTIME \ | #define VM_RTC_GETTIME \ | ||||
_IOR('v', IOCNUM_RTC_GETTIME, struct vm_rtc_time) | _IOR('v', IOCNUM_RTC_GETTIME, struct vm_rtc_time) | ||||
#define VM_RESTART_INSTRUCTION \ | #define VM_RESTART_INSTRUCTION \ | ||||
_IOW('v', IOCNUM_RESTART_INSTRUCTION, int) | _IOW('v', IOCNUM_RESTART_INSTRUCTION, int) | ||||
#define VM_GET_ACPI_DEVICE_INFO \ | |||||
_IOWR('v', IOCNUM_GET_ACPI_DEVICE_INFO, struct vm_acpi_device_info) | |||||
#define VM_SNAPSHOT_REQ \ | #define VM_SNAPSHOT_REQ \ | ||||
_IOWR('v', IOCNUM_SNAPSHOT_REQ, struct vm_snapshot_meta) | _IOWR('v', IOCNUM_SNAPSHOT_REQ, struct vm_snapshot_meta) | ||||
#define VM_RESTORE_TIME \ | #define VM_RESTORE_TIME \ | ||||
_IOWR('v', IOCNUM_RESTORE_TIME, int) | _IOWR('v', IOCNUM_RESTORE_TIME, int) | ||||
#endif | #endif |