From: Marcelo Tosatti <mtosatti@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, Radim Krcmar <rkrcmar@redhat.com>
Cc: kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 1/2] KVM: x86: fix lapic_timer_int_injected with APIC-v
Date: Mon, 02 Feb 2015 15:26:08 -0200 [thread overview]
Message-ID: <20150202172613.630983278@redhat.com> (raw)
In-Reply-To: 20150202172607.625424844@redhat.com
[-- Attachment #1: lapic-advancement-fix-APICv --]
[-- Type: text/plain, Size: 982 bytes --]
With APICv, LAPIC timer interrupt is always delivered via IRR:
apic_find_highest_irr syncs PIR to IRR.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
arch/x86/kvm/lapic.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: kvm/arch/x86/kvm/lapic.c
===================================================================
--- kvm.orig/arch/x86/kvm/lapic.c 2015-02-02 14:57:19.903066983 -0200
+++ kvm/arch/x86/kvm/lapic.c 2015-02-02 15:25:40.197299923 -0200
@@ -1086,13 +1086,13 @@
if (kvm_apic_hw_enabled(apic)) {
int vec = reg & APIC_VECTOR_MASK;
+ void *bitmap = apic->regs + APIC_ISR;
- if (kvm_x86_ops->test_posted_interrupt)
- return kvm_x86_ops->test_posted_interrupt(vcpu, vec);
- else {
- if (apic_test_vector(vec, apic->regs + APIC_ISR))
- return true;
- }
+ if (kvm_x86_ops->deliver_posted_interrupt)
+ bitmap = apic->regs + APIC_IRR;
+
+ if (apic_test_vector(vec, bitmap))
+ return true;
}
return false;
}
next prev parent reply other threads:[~2015-02-02 17:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 17:26 [patch 0/2] Fix busy-spin of lapic_timer_int_injected with APIC-v Marcelo Tosatti
2015-02-02 17:26 ` Marcelo Tosatti [this message]
2015-02-02 17:26 ` [patch 2/2] KVM: x86: revert "add method to test PIR bitmap vector" Marcelo Tosatti
2015-02-02 17:37 ` [patch 0/2] Fix busy-spin of lapic_timer_int_injected with APIC-v Paolo Bonzini
2015-02-02 17:44 ` Marcelo Tosatti
2015-02-02 18:14 ` 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=20150202172613.630983278@redhat.com \
--to=mtosatti@redhat.com \
--cc=kvm@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).