mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: mshv: Update mshv crates to v0.3.0
And modify to code to use the updated interfaces. Arguments for map_guest_memory, get_dirty_bitmap, vp.run(), import_isolated_pages, modify_gpa_host_access have changed. Update these to use the new interfaces, including new MSHV_* definitions, and remove some redundant arguments. Update seccomp IOCTLs to reflect interface changes. Fix irq-related definitions naming. Bump vfio-ioctls to support mshv v0.3.0. Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
d9ee760f3b
commit
9f08aa6dc2
+1
-1
@@ -51,7 +51,7 @@ libc = "0.2.158"
|
||||
linux-loader = { version = "0.11.0", features = ["bzimage", "elf", "pe"] }
|
||||
log = "0.4.22"
|
||||
micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" }
|
||||
mshv-bindings = { git = "https://github.com/rust-vmm/mshv", tag = "v0.2.0", features = [
|
||||
mshv-bindings = { git = "https://github.com/rust-vmm/mshv", tag = "v0.3.0", features = [
|
||||
"fam-wrappers",
|
||||
"with-serde",
|
||||
], optional = true }
|
||||
|
||||
@@ -159,8 +159,13 @@ use hypervisor::mshv::mshv_ioctls::*;
|
||||
fn create_vmm_ioctl_seccomp_rule_common_mshv() -> Result<Vec<SeccompRule>, BackendError> {
|
||||
Ok(or![
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_CREATE_PARTITION())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_MAP_GUEST_MEMORY())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_UNMAP_GUEST_MEMORY())?],
|
||||
and![Cond::new(
|
||||
1,
|
||||
ArgLen::Dword,
|
||||
Eq,
|
||||
MSHV_INITIALIZE_PARTITION()
|
||||
)?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_SET_GUEST_MEMORY())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_CREATE_VP())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_IRQFD())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_IOEVENTFD())?],
|
||||
@@ -186,7 +191,7 @@ fn create_vmm_ioctl_seccomp_rule_common_mshv() -> Result<Vec<SeccompRule>, Backe
|
||||
1,
|
||||
ArgLen::Dword,
|
||||
Eq,
|
||||
MSHV_GET_GPA_ACCESS_STATES()
|
||||
MSHV_GET_GPAP_ACCESS_BITMAP()
|
||||
)?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_VP_TRANSLATE_GVA())?],
|
||||
and![Cond::new(
|
||||
@@ -700,8 +705,7 @@ fn create_vcpu_ioctl_seccomp_rule_mshv() -> Result<Vec<SeccompRule>, BackendErro
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_RUN_VP())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_GET_VP_REGISTERS())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_SET_VP_REGISTERS())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_MAP_GUEST_MEMORY())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_UNMAP_GUEST_MEMORY())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_SET_GUEST_MEMORY())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_VP_TRANSLATE_GVA())?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_GET_VP_CPUID_VALUES())?],
|
||||
and![Cond::new(
|
||||
|
||||
Reference in New Issue
Block a user