Re: [kvm-unit-tests PATCH] x86: tscdeadline timer testing when apic is hw disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux