mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: Don't create temporary vector for boot MSRs
The MSRs are constant at boot time so rather than creating a vector in the boot_msr_entries() method instead reaturn a reference to static MSR array data. Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
@@ -558,7 +558,7 @@ pub trait Vcpu: Send + Sync {
|
||||
///
|
||||
/// Return the list of initial MSR entries for a VCPU
|
||||
///
|
||||
fn boot_msr_entries(&self) -> Vec<MsrEntry>;
|
||||
fn boot_msr_entries(&self) -> &'static [MsrEntry];
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user