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:
parent
a91235dab1
commit
4abebc9e56
5 changed files with 7 additions and 9 deletions
|
|
@ -82,7 +82,7 @@ pub fn setup_fpu(vcpu: &dyn hypervisor::Vcpu) -> Result<()> {
|
|||
///
|
||||
/// * `vcpu` - Structure for the VCPU that holds the VCPU's fd.
|
||||
pub fn setup_msrs(vcpu: &dyn hypervisor::Vcpu) -> Result<()> {
|
||||
vcpu.set_msrs(&vcpu.boot_msr_entries())
|
||||
vcpu.set_msrs(vcpu.boot_msr_entries())
|
||||
.map_err(Error::SetModelSpecificRegisters)?;
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue