From: Wanpeng Li <kernellwp@gmail.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Marcelo Tosatti" <mtosatti@redhat.com>
Subject: [PATCH v5 3/4] KVM: LAPIC: Ignore timer migration when lapic timer is injected by pi
Date: Fri, 21 Jun 2019 17:40:01 +0800 [thread overview]
Message-ID: <1561110002-4438-4-git-send-email-wanpengli@tencent.com> (raw)
In-Reply-To: <1561110002-4438-1-git-send-email-wanpengli@tencent.com>
From: Wanpeng Li <wanpengli@tencent.com>
When lapic timer is injected by posted-interrupt, the emulated timer is
offload to the housekeeping cpu. The timer interrupt will be delivered
properly, no need to migrate timer.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
---
arch/x86/kvm/lapic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 8869d30..ae575c0 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -2522,7 +2522,8 @@ void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu)
{
struct hrtimer *timer;
- if (!lapic_in_kernel(vcpu))
+ if (!lapic_in_kernel(vcpu) ||
+ posted_interrupt_inject_timer(vcpu))
return;
timer = &vcpu->arch.apic->lapic_timer.timer;
--
2.7.4
next prev parent reply other threads:[~2019-06-21 9:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 9:39 [PATCH v5 0/4] KVM: LAPIC: Implement Exitless Timer Wanpeng Li
2019-06-21 9:39 ` [PATCH v5 1/4] KVM: LAPIC: Make lapic timer unpinned Wanpeng Li
2019-06-21 9:40 ` [PATCH v5 2/4] KVM: LAPIC: Inject timer interrupt via posted interrupt Wanpeng Li
2019-07-05 12:37 ` Paolo Bonzini
[not found] ` <HK2PR02MB4145E122DC5AC2445137A10F80F50@HK2PR02MB4145.apcprd02.prod.outlook.com>
2019-07-05 13:00 ` Paolo Bonzini
[not found] ` <HK2PR02MB4145BBA5B72DD70AC622FD0E80F50@HK2PR02MB4145.apcprd02.prod.outlook.com>
2019-07-05 13:42 ` Paolo Bonzini
2019-06-21 9:40 ` Wanpeng Li [this message]
2019-06-21 9:40 ` [PATCH v5 4/4] KVM: LAPIC: Don't inject already-expired timer " Wanpeng Li
2019-07-05 12:40 ` Paolo Bonzini
[not found] ` <HK2PR02MB4145B13227997511174DBFA480F50@HK2PR02MB4145.apcprd02.prod.outlook.com>
2019-07-05 13:26 ` Paolo Bonzini
2019-07-02 16:38 ` [PATCH v5 0/4] KVM: LAPIC: Implement Exitless Timer Paolo Bonzini
2019-07-02 22:23 ` Marcelo Tosatti
2019-07-03 0:47 ` Wanpeng Li
2019-07-03 1:01 ` Wanpeng Li
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=1561110002-4438-4-git-send-email-wanpengli@tencent.com \
--to=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@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®