From: "Radim Krčmář" <rkrcmar@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, Wanpeng Li <kernellwp@gmail.com>
Subject: [PATCH 2/3] KVM: x86: really disarm lapic timer when clearing TMICT
Date: Fri, 6 Oct 2017 19:25:54 +0200 [thread overview]
Message-ID: <20171006172555.30087-3-rkrcmar@redhat.com> (raw)
In-Reply-To: <20171006172555.30087-1-rkrcmar@redhat.com>
preemption timer only looks at tscdeadline and could inject already
disarmed timer.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.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
next prev parent reply other threads:[~2017-10-06 17:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 17:25 [PATCH 0/3] KVM: x86: fix restart_apic_timer Radim Krčmář
2017-10-06 17:25 ` [PATCH 1/3] KVM: x86: handle 0 write to TSC_DEADLINE MSR Radim Krčmář
2017-10-07 0:26 ` Wanpeng Li
2017-10-06 17:25 ` Radim Krčmář [this message]
2017-10-07 0:30 ` [PATCH 2/3] KVM: x86: really disarm lapic timer when clearing TMICT Wanpeng Li
2017-10-06 17:25 ` [PATCH 3/3] KVM: x86: thoroughly disarm LAPIC timer around TSC deadline switch Radim Krčmář
2017-10-07 0:30 ` Wanpeng Li
2017-10-07 0:58 ` [PATCH 0/3] KVM: x86: fix restart_apic_timer Wanpeng Li
2017-10-10 8:35 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171006172555.30087-3-rkrcmar@redhat.com \
--to=rkrcmar@redhat.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®