diff options
author | 2015-02-27 16:32:38 +0100 | |
---|---|---|
committer | 2015-03-02 19:04:40 -0300 | |
commit | f563db4bdb8ef5ea73d0f5ea2b20384c10fbd617 (patch) | |
tree | 1536e267fe320ec62c2b6b788a88c8c831a37f3f /net/switchdev/switchdev.c | |
parent | KVM: emulate: fix CMPXCHG8B on 32-bit hosts (diff) | |
download | wireguard-linux-f563db4bdb8ef5ea73d0f5ea2b20384c10fbd617.tar.xz wireguard-linux-f563db4bdb8ef5ea73d0f5ea2b20384c10fbd617.zip |
KVM: SVM: fix interrupt injection (apic->isr_count always 0)
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>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions