stub some msr for new linux kernel
This commit is contained in:
parent
b9df44e646
commit
2a8a89dd34
|
@ -195,6 +195,10 @@ pub const IA32_SYSENTER_EIP: i32 = 374;
|
|||
pub const IA32_TIME_STAMP_COUNTER: i32 = 16;
|
||||
pub const IA32_PLATFORM_ID: i32 = 23;
|
||||
pub const IA32_APIC_BASE_MSR: i32 = 27;
|
||||
pub const IA32_SPEC_CTRL: i32 = 0x48;
|
||||
pub const MSR_TSX_FORCE_ABORT: i32 = 0x10F;
|
||||
pub const IA32_TSX_CTRL: i32 = 0x122;
|
||||
pub const IA32_MCU_OPT_CTRL: i32 = 0x123;
|
||||
pub const IA32_BIOS_SIGN_ID: i32 = 139;
|
||||
pub const MSR_PLATFORM_INFO: i32 = 206;
|
||||
pub const MSR_MISC_FEATURE_ENABLES: i32 = 320;
|
||||
|
@ -202,10 +206,11 @@ pub const IA32_MISC_ENABLE: i32 = 416;
|
|||
pub const IA32_RTIT_CTL: i32 = 1392;
|
||||
pub const MSR_SMI_COUNT: i32 = 52;
|
||||
pub const MSR_TEST_CTRL: i32 = 0x33;
|
||||
pub const MSR_IA32_FEAT_CTL: i32 = 0x3a;
|
||||
pub const IA32_FEAT_CTL: i32 = 0x3a;
|
||||
pub const IA32_PAT: i32 = 0x277;
|
||||
pub const IA32_MCG_CAP: i32 = 377;
|
||||
pub const IA32_KERNEL_GS_BASE: i32 = 0xC0000101u32 as i32;
|
||||
pub const MSR_AMD64_LS_CFG: i32 = 0xC0011020u32 as i32;
|
||||
pub const MSR_PKG_C2_RESIDENCY: i32 = 1549;
|
||||
pub const IA32_APIC_BASE_BSP: i32 = 1 << 8;
|
||||
pub const IA32_APIC_BASE_EXTD: i32 = 1 << 10;
|
||||
|
|
|
@ -1180,7 +1180,7 @@ pub unsafe fn instr_0F30() {
|
|||
else if index == IA32_SYSENTER_ESP {
|
||||
*sysenter_esp = low
|
||||
}
|
||||
else if index == MSR_IA32_FEAT_CTL {
|
||||
else if index == IA32_FEAT_CTL {
|
||||
// linux 5.x
|
||||
}
|
||||
else if index == MSR_TEST_CTRL {
|
||||
|
@ -1221,6 +1221,18 @@ pub unsafe fn instr_0F30() {
|
|||
else if index == IA32_PAT {
|
||||
//
|
||||
}
|
||||
else if index == IA32_SPEC_CTRL {
|
||||
// linux 5.19
|
||||
}
|
||||
else if index == IA32_TSX_CTRL {
|
||||
// linux 5.19
|
||||
}
|
||||
else if index == MSR_TSX_FORCE_ABORT {
|
||||
// linux 5.19
|
||||
}
|
||||
else if index == IA32_MCU_OPT_CTRL {
|
||||
// linux 5.19
|
||||
}
|
||||
else {
|
||||
dbg_log!("Unknown msr: {:x}", index);
|
||||
dbg_assert!(false);
|
||||
|
@ -1270,7 +1282,7 @@ pub unsafe fn instr_0F32() {
|
|||
low = tsc as i32;
|
||||
high = (tsc >> 32) as i32
|
||||
}
|
||||
else if index == MSR_IA32_FEAT_CTL {
|
||||
else if index == IA32_FEAT_CTL {
|
||||
// linux 5.x
|
||||
}
|
||||
else if index == MSR_TEST_CTRL {
|
||||
|
@ -1310,6 +1322,21 @@ pub unsafe fn instr_0F32() {
|
|||
}
|
||||
else if index == MSR_PKG_C2_RESIDENCY {
|
||||
}
|
||||
else if index == IA32_SPEC_CTRL {
|
||||
// linux 5.19
|
||||
}
|
||||
else if index == IA32_TSX_CTRL {
|
||||
// linux 5.19
|
||||
}
|
||||
else if index == MSR_TSX_FORCE_ABORT {
|
||||
// linux 5.19
|
||||
}
|
||||
else if index == IA32_MCU_OPT_CTRL {
|
||||
// linux 5.19
|
||||
}
|
||||
else if index == MSR_AMD64_LS_CFG {
|
||||
// linux 5.19
|
||||
}
|
||||
else {
|
||||
dbg_log!("Unknown msr: {:x}", index);
|
||||
dbg_assert!(false);
|
||||
|
|
Loading…
Reference in a new issue