[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANRm+CwaUw1Zit8C-Di+C4WugfQrxgxigX7xG5WY7nb8V_S-wQ@mail.gmail.com>
Date: Sat, 7 Oct 2017 08:30:38 +0800
From: Wanpeng Li <kernellwp@...il.com>
To: Radim Krčmář <rkrcmar@...hat.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kvm <kvm@...r.kernel.org>, Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH 2/3] KVM: x86: really disarm lapic timer when clearing TMICT
2017-10-07 1:25 GMT+08:00 Radim Krčmář <rkrcmar@...hat.com>:
> preemption timer only looks at tscdeadline and could inject already
> disarmed timer.
>
> Signed-off-by: Radim Krčmář <rkrcmar@...hat.com>
Reviewed-by: Wanpeng Li <wanpeng.li@...mail.com>
> ---
> arch/x86/kvm/lapic.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 39c1ae11ce1d..96ade848ae0b 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1489,8 +1489,10 @@ static bool set_target_expiration(struct kvm_lapic *apic)
> apic->lapic_timer.period = (u64)kvm_lapic_get_reg(apic, APIC_TMICT)
> * APIC_BUS_CYCLE_NS * apic->divide_count;
>
> - if (!apic->lapic_timer.period)
> + if (!apic->lapic_timer.period) {
> + apic->lapic_timer.tscdeadline = 0;
> return false;
> + }
>
> limit_periodic_timer_frequency(apic);
>
> --
> 2.14.2
>
Powered by blists - more mailing lists