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:
Rob Bradford
2025-11-26 12:28:05 +00:00
parent a91235dab1
commit 4abebc9e56
5 changed files with 7 additions and 9 deletions

View File

@@ -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")]
///