Re: [PATCH] KVM: LAPIC: Reset timer_advance_ns if timer mode switch

2020-09-04 Thread Sean Christopherson
On Thu, Sep 03, 2020 at 06:57:00PM +0800, Wanpeng Li wrote: > On Thu, 3 Sep 2020 at 05:23, Sean Christopherson > wrote: > > > > On Fri, Aug 28, 2020 at 09:35:08AM +0800, Wanpeng Li wrote: > > > From: Wanpeng Li > > > > > > per-vCPU timer_advance_ns should be set to 0 if timer mode is not > > > t

Re: [PATCH] KVM: LAPIC: Reset timer_advance_ns if timer mode switch

2020-09-03 Thread Wanpeng Li
On Thu, 3 Sep 2020 at 05:23, Sean Christopherson wrote: > > On Fri, Aug 28, 2020 at 09:35:08AM +0800, Wanpeng Li wrote: > > From: Wanpeng Li > > > > per-vCPU timer_advance_ns should be set to 0 if timer mode is not > > tscdeadline > > otherwise we waste cpu cycles in the function lapic_timer_int

Re: [PATCH] KVM: LAPIC: Reset timer_advance_ns if timer mode switch

2020-09-02 Thread Sean Christopherson
On Fri, Aug 28, 2020 at 09:35:08AM +0800, Wanpeng Li wrote: > From: Wanpeng Li > > per-vCPU timer_advance_ns should be set to 0 if timer mode is not tscdeadline > otherwise we waste cpu cycles in the function lapic_timer_int_injected(), > especially on AMD platform which doesn't support tscdead

Re: [PATCH] KVM: LAPIC: Reset timer_advance_ns if timer mode switch

2020-08-31 Thread Wanpeng Li
On Mon, 31 Aug 2020 at 20:48, Vitaly Kuznetsov wrote: > > Wanpeng Li writes: > > > From: Wanpeng Li > > > > per-vCPU timer_advance_ns should be set to 0 if timer mode is not > > tscdeadline > > otherwise we waste cpu cycles in the function lapic_timer_int_injected(), > > lapic_timer_int_injecte

Re: [PATCH] KVM: LAPIC: Reset timer_advance_ns if timer mode switch

2020-08-31 Thread Vitaly Kuznetsov
Wanpeng Li writes: > From: Wanpeng Li > > per-vCPU timer_advance_ns should be set to 0 if timer mode is not tscdeadline > otherwise we waste cpu cycles in the function lapic_timer_int_injected(), lapic_timer_int_injected is just a test, kvm_wait_lapic_expire() (__kvm_wait_lapic_expire()) mayb

[PATCH] KVM: LAPIC: Reset timer_advance_ns if timer mode switch

2020-08-27 Thread Wanpeng Li
From: Wanpeng Li per-vCPU timer_advance_ns should be set to 0 if timer mode is not tscdeadline otherwise we waste cpu cycles in the function lapic_timer_int_injected(), especially on AMD platform which doesn't support tscdeadline mode. We can reset timer_advance_ns to the initial value if swit