add support for hypercalls

This commit is contained in:
Alex Zenla
2024-01-08 20:45:16 -08:00
parent 47b924d618
commit faf8027590
5 changed files with 158 additions and 1 deletions

11
xencall/src/sys.rs Normal file
View File

@ -0,0 +1,11 @@
use nix::{ioctl_readwrite_bad, request_code_none};
use std::ffi::{c_long, c_ulong};
#[repr(C)]
pub struct Hypercall {
pub op: c_ulong,
pub arg: [c_ulong; 5],
pub retval: c_long,
}
ioctl_readwrite_bad!(hypercall, request_code_none!(b'E', 0), Hypercall);