obliteration/gui/kvm.cpp
Putta Khunchalee cc64722ef0
Some checks are pending
Development Build / Build (push) Waiting to run
Development Build / Update PRs (push) Waiting to run
Loads floating point registers for debugger (#1047)
2024-10-19 16:05:48 +02:00

22 lines
520 B
C++

// This file contains KVM wrappers for Rust side. The reason we need these wrappers is because the
// KVM ioctls is not available in the libc binding.
#include "core.h"
#include <sys/ioctl.h>
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#ifdef __x86_64__
extern "C" int kvm_set_sregs(int vcpu, const kvm_sregs *regs)
{
return ioctl(vcpu, KVM_SET_SREGS, regs);
}
extern "C" int kvm_translate(int vcpu, kvm_translation *arg) {
return ioctl(vcpu, KVM_TRANSLATE, arg);
}
#endif