hypervisor, vmm: Remove inner Mutex protecting VcpuFd

This was added in 7be69edf51 to deal with
changes to the KVM bindings that made run() and set_immediate_exit()
take &mut self. Instead adopt a Box<> value in Vcpu allowing the removal
of this internal Mutex.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
Rob Bradford
2025-10-23 17:38:46 +01:00
parent 0a25a77095
commit cb5aaca809
11 changed files with 50 additions and 200 deletions

View File

@@ -526,7 +526,7 @@ pub trait Vcpu: Send + Sync {
///
/// Triggers the running of the current virtual CPU returning an exit reason.
///
fn run(&self) -> std::result::Result<VmExit, HypervisorCpuError>;
fn run(&mut self) -> std::result::Result<VmExit, HypervisorCpuError>;
#[cfg(target_arch = "x86_64")]
///
/// Translate guest virtual address to guest physical address
@@ -542,7 +542,7 @@ pub trait Vcpu: Send + Sync {
///
/// Set the "immediate_exit" state
///
fn set_immediate_exit(&self, _exit: bool) {}
fn set_immediate_exit(&mut self, _exit: bool) {}
#[cfg(feature = "tdx")]
///
/// Returns the details about TDX exit reason