Skip to content

Commit

Permalink
Added APICBASE MSR. Fixes #790
Browse files Browse the repository at this point in the history
  • Loading branch information
jounathaen committed Feb 13, 2025
1 parent 84a1db8 commit e9da303
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/linux/x86_64/kvm_cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use crate::{
const CPUID_EXT_HYPERVISOR: u32 = 1 << 31;
const CPUID_TSC_DEADLINE: u32 = 1 << 24;
const CPUID_ENABLE_MSR: u32 = 1 << 5;
const MSR_IA32_APICBASE: u32 = 0x0000001b;
const MSR_IA32_MISC_ENABLE: u32 = 0x000001a0;
const PCI_CONFIG_DATA_PORT: u16 = 0xCFC;
const PCI_CONFIG_ADDRESS_PORT: u16 = 0xCF8;
Expand Down Expand Up @@ -264,6 +265,8 @@ impl KvmCpu {
// enable fast string operations
msr_entries[0].index = MSR_IA32_MISC_ENABLE;
msr_entries[0].data = 1;
msr_entries[1].index = MSR_IA32_APICBASE;
msr_entries[1].data = 1;

let msrs = Msrs::from_entries(&msr_entries)
.expect("Unable to create initial values for the machine specific registers");
Expand Down

0 comments on commit e9da303

Please # to comment.