From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Paolo Bonzini <pbonzini@redhat.com>, Borislav Petkov <bp@suse.de>,
Tiejun Chen <tiejun.chen@intel.com>
Subject: Re: [PATCH v2] KVM: SVM: fix interrupt injection (apic->isr_count always 0)
Date: Mon, 2 Mar 2015 19:04:58 -0300 [thread overview]
Message-ID: <20150302220457.GA3055@amt.cnet> (raw)
In-Reply-To: <1425051158-32472-1-git-send-email-rkrcmar@redhat.com>
On Fri, Feb 27, 2015 at 04:32:38PM +0100, Radim Krčmář wrote:
> In commit b4eef9b36db4, we started to use hwapic_isr_update() != NULL
> instead of kvm_apic_vid_enabled(vcpu->kvm). This didn't work because
> SVM had it defined and "apicv" path in apic_{set,clear}_isr() does not
> change apic->isr_count, because it should always be 1. The initial
> value of apic->isr_count was based on kvm_apic_vid_enabled(vcpu->kvm),
> which is always 0 for SVM, so KVM could have injected interrupts when it
> shouldn't.
>
> Fix it by implicitly setting SVM's hwapic_isr_update to NULL and make the
> initial isr_count depend on hwapic_isr_update() for good measure.
>
> Fixes: b4eef9b36db4 ("kvm: x86: vmx: NULL out hwapic_isr_update() in case of !enable_apicv")
> Reported-and-tested-by: Borislav Petkov <bp@suse.de>
> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
> ---
> v2: set hwapic_isr_update to NULL implicitly [Paolo]
>
> arch/x86/kvm/lapic.c | 4 ++--
> arch/x86/kvm/svm.c | 6 ------
> 2 files changed, 2 insertions(+), 8 deletions(-)
Applied, thanks.
prev parent reply other threads:[~2015-03-02 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 15:32 [PATCH v2] KVM: SVM: fix interrupt injection (apic->isr_count always 0) Radim Krčmář
2015-03-02 22:04 ` Marcelo Tosatti [this message]
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=20150302220457.GA3055@amt.cnet \
--to=mtosatti@redhat.com \
--cc=bp@suse.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=tiejun.chen@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.