From d272113d0c227a2bf0c56a01c1715af59ae8ee6c Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 16 Nov 2022 21:46:54 +0000 Subject: [PATCH] hypervisor: mshv: modify two safety comments Signed-off-by: Wei Liu --- hypervisor/src/mshv/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs index 0d5cca894..c5d96b2cd 100644 --- a/hypervisor/src/mshv/mod.rs +++ b/hypervisor/src/mshv/mod.rs @@ -458,12 +458,13 @@ impl cpu::Vcpu for MshvVcpu { _ => {} } - // SAFETY: access_info is valid, otherwise we won't be here assert!( + // SAFETY: access_info is valid, otherwise we won't be here (unsafe { access_info.__bindgen_anon_1.string_op() } != 1), "String IN/OUT not supported" ); assert!( + // SAFETY: access_info is valid, otherwise we won't be here (unsafe { access_info.__bindgen_anon_1.rep_prefix() } != 1), "Rep IN/OUT not supported" );