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 Mon, 3 Aug 2020 at 20:56, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> 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");

Agreed.

> >
> > 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?

Just sent out a patch to do it.

    Wanpeng



[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