28 #include <sys/ioctl.h> 37 return open(
"/dev/bareflank", O_RDWR);
43 return ioctl(fd, request);
49 return ioctl(fd, request, data);
55 return ioctl(fd, request, data);
85 if (bf_write_ioctl(fd, IOCTL_ADD_MODULE_LENGTH, &len) < 0)
92 if (bf_write_ioctl(fd, IOCTL_ADD_MODULE, data) < 0)
99 if (bf_send_ioctl(fd, IOCTL_LOAD_VMM) < 0)
106 if (bf_send_ioctl(fd, IOCTL_UNLOAD_VMM) < 0)
113 if (bf_send_ioctl(fd, IOCTL_START_VMM) < 0)
120 if (bf_send_ioctl(fd, IOCTL_STOP_VMM) < 0)
127 if (bf_write_ioctl(fd, IOCTL_SET_VCPUID, &vcpuid) < 0)
130 if (bf_read_ioctl(fd, IOCTL_DUMP_VMM, drr) < 0)
137 if (bf_read_ioctl(fd, IOCTL_VMM_STATUS, status) < 0)
144 if (bf_write_ioctl(fd, IOCTL_SET_CPUID, &cpuid) < 0)
147 if (bf_write_ioctl(fd, IOCTL_VMCALL, regs) < 0)
virtual void call_ioctl_stop_vmm()
int64_t unsigned long request
int64_t bf_read_ioctl(int64_t fd, unsigned long request, void *data)
virtual void call_ioctl_load_vmm()
int64_t unsigned long void * data
virtual void call_ioctl_add_module_length(module_len_type len)
virtual void call_ioctl_vmm_status(gsl::not_null< status_pointer > status)
debug_ring_resources_t * drr
virtual void call_ioctl_start_vmm()
virtual void call_ioctl_dump_vmm(gsl::not_null< drr_pointer > drr, vcpuid_type vcpuid)
#define driver_inaccessible(a)
int64_t bf_write_ioctl(int64_t fd, unsigned long request, const void *data)
~ioctl_private() override
virtual void call_ioctl_vmcall(gsl::not_null< registers_pointer > regs, cpuid_type cpuid)
int open(const char *file, int mode,...)
int __attribute__((weak)) bf_ioctl_open()
virtual void call_ioctl_add_module(gsl::not_null< module_data_type > data)
ioctl::vcpuid_type vcpuid_type
ioctl::cpuid_type cpuid_type
int64_t bf_send_ioctl(int64_t fd, unsigned long request)
virtual void call_ioctl_unload_vmm()