From 639db35635e9d0ce7e60cf94e1522c8b161e3d52 Mon Sep 17 00:00:00 2001 From: Nuno Das Neves Date: Thu, 28 Mar 2024 16:32:31 +0000 Subject: [PATCH] vmm: Update and add seccomp IOCTL numbers for mshv Add IOCTL number for generic hypercall ioctl (MSHV_ROOT_HVCALL). Update IOCTL numbers for set/get vp state. Signed-off-by: Nuno Das Neves --- vmm/src/seccomp_filters.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vmm/src/seccomp_filters.rs b/vmm/src/seccomp_filters.rs index e75b164cd..b8a213efd 100644 --- a/vmm/src/seccomp_filters.rs +++ b/vmm/src/seccomp_filters.rs @@ -165,8 +165,8 @@ mod mshv { pub const MSHV_GET_VP_REGISTERS: u64 = 0xc010_b805; pub const MSHV_SET_VP_REGISTERS: u64 = 0x4010_b806; pub const MSHV_RUN_VP: u64 = 0x8100_b807; - pub const MSHV_GET_VP_STATE: u64 = 0xc028_b80a; - pub const MSHV_SET_VP_STATE: u64 = 0xc028_b80b; + pub const MSHV_GET_VP_STATE: u64 = 0xc010_b80a; + pub const MSHV_SET_VP_STATE: u64 = 0xc010_b80b; pub const MSHV_SET_PARTITION_PROPERTY: u64 = 0x4010_b80c; pub const MSHV_GET_GPA_ACCESS_STATES: u64 = 0xc01c_b812; pub const MSHV_VP_TRANSLATE_GVA: u64 = 0xc020_b80e; @@ -183,6 +183,7 @@ mod mshv { pub const MSHV_SEV_SNP_AP_CREATE: u64 = 0x4010_b834; pub const MSHV_ISSUE_PSP_GUEST_REQUEST: u64 = 0x4010_b831; pub const MSHV_ASSERT_INTERRUPT: u64 = 0x4018_b809; + pub const MSHV_ROOT_HVCALL: u64 = 0xc020_b835; } #[cfg(feature = "mshv")] use mshv::*; @@ -244,6 +245,7 @@ fn create_vmm_ioctl_seccomp_rule_common_mshv() -> Result, Backe Eq, MSHV_ISSUE_PSP_GUEST_REQUEST )?], + and![Cond::new(1, ArgLen::Dword, Eq, MSHV_ROOT_HVCALL)?], ]) } @@ -725,6 +727,7 @@ fn create_vcpu_ioctl_seccomp_rule_mshv() -> Result, BackendErro Eq, MSHV_ISSUE_PSP_GUEST_REQUEST )?], + and![Cond::new(1, ArgLen::Dword, Eq, MSHV_ROOT_HVCALL)?], ]) }