From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: rkrcmar@redhat.com, rkagan@virtuozzo.com, dplotnikov@virtuozzo.com
Subject: [PATCH 5/6] KVM: lapic: do not set KVM_REQ_EVENT unnecessarily on PPR update
Date: Mon, 19 Dec 2016 10:47:17 +0100 [thread overview]
Message-ID: <1482140838-6303-6-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1482140838-6303-1-git-send-email-pbonzini@redhat.com>
On PPR update, we set KVM_REQ_EVENT unconditionally anytime PPR is lowered.
But we can take into account IRR here already.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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 f936644d8011..dc4ea8bdea9c 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -607,7 +607,8 @@ static void apic_update_ppr(struct kvm_lapic *apic)
{
u32 ppr;
- if (__apic_update_ppr(apic, &ppr))
+ if (__apic_update_ppr(apic, &ppr) &&
+ apic_has_interrupt_for_ppr(apic, ppr) != -1)
kvm_make_request(KVM_REQ_EVENT, apic->vcpu);
}
--
1.8.3.1
next prev parent reply other threads:[~2016-12-19 9:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 9:47 [RFC PATCH v3 0/6] KVM: x86: avoid redundant REQ_EVENT Paolo Bonzini
2016-12-19 9:47 ` [PATCH 1/6] KVM: x86: add VCPU stat for KVM_REQ_EVENT processing Paolo Bonzini
[not found] ` <20161220092101.GE2081@rkaganb.sw.ru>
2016-12-20 9:32 ` Paolo Bonzini
2016-12-19 9:47 ` [PATCH 2/6] KVM: lapic: do not set KVM_REQ_EVENT unnecessarily on EOI Paolo Bonzini
2016-12-23 12:08 ` Paolo Bonzini
2016-12-19 9:47 ` [PATCH 3/6] KVM: vmx: speed up TPR below threshold vmexits Paolo Bonzini
2016-12-19 9:47 ` [PATCH 4/6] KVM: lapic: avoid unnecessary KVM_REQ_EVENT on IRR scan Paolo Bonzini
2016-12-19 9:47 ` Paolo Bonzini [this message]
2016-12-19 9:47 ` [PATCH 6/6] KVM: lapic: do not scan IRR when delivering an interrupt Paolo Bonzini
2016-12-20 17:11 ` Paolo Bonzini
2016-12-19 13:05 ` [RFC PATCH v3 0/6] KVM: x86: avoid redundant REQ_EVENT Denis Plotnikov
2016-12-19 14:30 ` Paolo Bonzini
2016-12-20 10:01 ` Roman Kagan
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=1482140838-6303-6-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=dplotnikov@virtuozzo.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rkagan@virtuozzo.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®