hypervisor: x86: drop get/set VcpuEvents from vcpu trait

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2022-07-17 15:44:35 +00:00
committed by Liu Wei
parent 58dbf07453
commit d461daa7fa
3 changed files with 41 additions and 53 deletions

View File

@@ -19,7 +19,7 @@ use crate::kvm::{TdxExitDetails, TdxExitStatus};
#[cfg(target_arch = "x86_64")]
use crate::x86_64::LapicState;
#[cfg(target_arch = "x86_64")]
use crate::x86_64::{MsrEntries, VcpuEvents};
use crate::x86_64::MsrEntries;
use crate::CpuState;
#[cfg(target_arch = "aarch64")]
use crate::DeviceAttr;
@@ -349,18 +349,6 @@ pub trait Vcpu: Send + Sync {
/// Sets the vcpu's current "multiprocessing state".
///
fn set_mp_state(&self, mp_state: MpState) -> Result<()>;
#[cfg(target_arch = "x86_64")]
///
/// Returns currently pending exceptions, interrupts, and NMIs as well as related
/// states of the vcpu.
///
fn get_vcpu_events(&self) -> Result<VcpuEvents>;
#[cfg(target_arch = "x86_64")]
///
/// Sets pending exceptions, interrupts, and NMIs as well as related states
/// of the vcpu.
///
fn set_vcpu_events(&self, events: &VcpuEvents) -> Result<()>;
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
///
/// Let the guest know that it has been paused, which prevents from