hypervisor: turn boot_msr_entries into a trait method

This allows dispatching to either KVM or MSHV automatically.

No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2022-07-08 14:08:10 +00:00
committed by Rob Bradford
parent 121729a3b0
commit 84bbaf06d1
7 changed files with 56 additions and 40 deletions

View File

@@ -501,4 +501,9 @@ pub trait Vcpu: Send + Sync {
/// Set the status code for TDX exit
///
fn set_tdx_status(&mut self, status: TdxExitStatus);
#[cfg(target_arch = "x86_64")]
///
/// Return the list of initial MSR entries for a VCPU
///
fn boot_msr_entries(&self) -> MsrEntries;
}