1 // SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause 2 // 3 // Copyright © 2025, Microsoft Corporation 4 // 5 use std::fmt; 6 7 /// 8 /// Export generically-named wrappers of mshv_bindings for Unix-based platforms 9 /// 10 pub use mshv_bindings::StandardRegisters as MshvStandardRegisters; 11 use serde::{Deserialize, Serialize}; 12 13 #[derive(Clone, Serialize, Deserialize)] 14 pub struct VcpuMshvState { 15 pub regs: MshvStandardRegisters, 16 } 17 18 impl fmt::Display for VcpuMshvState { 19 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 20 write!(f, "Standard registers: {:?}", self.regs) 21 } 22 } 23