add support for hypercalls

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

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
use std::ffi::c_ulong;
use std::ptr::addr_of;
use xencall::{XenCall, XenCallError};
fn main() -> Result<(), XenCallError> {
let mut call = XenCall::open()?;
let message = "Hello World";
let bytes = message.as_bytes();
call.hypercall3(18, 0, bytes.len() as c_ulong, addr_of!(bytes) as c_ulong)?;
Ok(())
}