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 1/3] KVM: x86: handle 0 write to TSC_DEADLINE MSR
Date: Fri, 6 Oct 2017 19:25:53 +0200 [thread overview]
Message-ID: <20171006172555.30087-2-rkrcmar@redhat.com> (raw)
In-Reply-To: <20171006172555.30087-1-rkrcmar@redhat.com>
0 should disable the timer, but start_hv_timer will recognize it as an
expired timer instead.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
arch/x86/kvm/lapic.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 2c9e88a82738..39c1ae11ce1d 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1549,6 +1549,9 @@ static bool start_hv_timer(struct kvm_lapic *apic)
if (!apic_lvtt_period(apic) && atomic_read(&ktimer->pending))
return false;
+ if (!ktimer->tscdeadline)
+ return false;
+
r = kvm_x86_ops->set_hv_timer(apic->vcpu, ktimer->tscdeadline);
if (r < 0)
return false;
--
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 ` Radim Krčmář [this message]
2017-10-07 0:26 ` [PATCH 1/3] KVM: x86: handle 0 write to TSC_DEADLINE MSR Wanpeng Li
2017-10-06 17:25 ` [PATCH 2/3] KVM: x86: really disarm lapic timer when clearing TMICT Radim Krčmář
2017-10-07 0:30 ` 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-2-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®