On 03/08/20 14:41, Vitaly Kuznetsov wrote: >> - report(tdt_count == 1, "tsc deadline timer"); >> - report(rdmsr(MSR_IA32_TSCDEADLINE) == 0, "tsc deadline timer clearing"); >> + if (apic_enabled) { >> + report(tdt_count == 1, "tsc deadline timer"); >> + report(rdmsr(MSR_IA32_TSCDEADLINE) == 0, "tsc deadline timer clearing"); >> + } else >> + report(rdmsr(MSR_IA32_TSCDEADLINE) == 0, "tsc deadline timer is not set"); > I'd suggest we also check that the timer didn't fire, e.g. > > report(tdt_count == 0, "tsc deadline timer didn't fire"); > > as a bonus, we'd get another reason to use braces for both branches of > the 'if' (which is a good thing regardless). > Agreed, and KVM also needs to return 0 if the APIC is hardware-disabled I think? Paolo