Skip to content

Commit 4402c82

Browse files
kalyazinShadowCurse
authored andcommitted
fix(cpu-template-helper): exclude TSC_DEADLINE MSR from dump
The TSC_DEADLINE MSR value is volatile is it is getting updated by the guest kernel based on the current TSC value. Signed-off-by: Nikita Kalyazin <[email protected]>
1 parent 94b37cb commit 4402c82

File tree

1 file changed

+3
-1
lines changed
  • src/cpu-template-helper/src/template/dump

1 file changed

+3
-1
lines changed

src/cpu-template-helper/src/template/dump/x86_64.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ fn msrs_to_modifier(msrs: &HashMap<u32, u64>) -> Vec<RegisterModifier> {
6868
// Fireracker diables some features (e.g., PMU) and doesn't support some features (e.g., Hyper-V),
6969
// MSRs related to such features are not useful as CPU configuration dump. Excluding such MSRs
7070
// reduces maintenance cost when KVM makes change their default values.
71-
const MSR_EXCLUSION_LIST: [MsrRange; 9] = [
71+
const MSR_EXCLUSION_LIST: [MsrRange; 10] = [
7272
// - MSR_IA32_TSC (0x10): vary depending on the elapsed time.
7373
MSR_RANGE!(MSR_IA32_TSC),
74+
// - MSR_IA32_TSC_DEADLINE (0x6e0): varies depending on the elapsed time.
75+
MSR_RANGE!(MSR_IA32_TSC_DEADLINE),
7476
// Firecracker doesn't support MCE.
7577
// - MSR_IA32_MCG_STATUS (0x17a)
7678
// - MSR_IA32_MCG_EXT_CTL (0x4d0)

0 commit comments

Comments
 (0)