lkml.org 
[lkml]   [2015]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] KVM: SVM: fix interrupt injection (apic->isr_count always 0)
On Wed, Feb 25, 2015 at 08:41:41PM +0100, Radim Krčmář wrote:
> this patch should fix it.

Yap, seems so :-)

> ---8<---
> 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 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-by: Borislav Petkov <bp@alien8.de>

Reported-and-tested-by: Borislav Petkov <bp@suse.de>

> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

Thanks.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--


\
 
 \ /
  Last update: 2015-02-26 13:41    [W:0.068 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site