diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs index 071d33d4b..30a79ae1b 100644 --- a/hypervisor/src/mshv/mod.rs +++ b/hypervisor/src/mshv/mod.rs @@ -342,12 +342,14 @@ impl cpu::Vcpu for MshvVcpu { _ => {} } - if unsafe { access_info.__bindgen_anon_1.string_op() } == 1 { - panic!("String IN/OUT not supported"); - } - if unsafe { access_info.__bindgen_anon_1.rep_prefix() } == 1 { - panic!("Rep IN/OUT not supported"); - } + assert!( + !(unsafe { access_info.__bindgen_anon_1.string_op() } == 1), + "String IN/OUT not supported" + ); + assert!( + !(unsafe { access_info.__bindgen_anon_1.rep_prefix() } == 1), + "Rep IN/OUT not supported" + ); if is_write { let data = (info.rax as u32).to_le_bytes();