]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 27 Nov 2020 07:53:52 +0000 (08:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Dec 2020 07:48:07 +0000 (08:48 +0100)
commitf6d579d770d50d21d5ad26d3dbdafe2237967766
treee9cbb184abf83bd91102e301ad670cd8c219b4d2
parent53ee75b86be1bbaaa17a24149197fe8b4b84ac5e
KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint

commit 72c3bcdcda494cbd600712a32e67702cdee60c07 upstream.

Centralize handling of interrupts from the userspace APIC
in kvm_cpu_has_extint and kvm_cpu_get_extint, since
userspace APIC interrupts are handled more or less the
same as ExtINTs are with split irqchip.  This removes
duplicated code from kvm_cpu_has_injectable_intr and
kvm_cpu_has_interrupt, and makes the code more similar
between kvm_cpu_has_{extint,interrupt} on one side
and kvm_cpu_get_{extint,interrupt} on the other.

Cc: stable@vger.kernel.org
Reviewed-by: Filippo Sironi <sironi@amazon.de>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Tested-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/irq.c
arch/x86/kvm/lapic.c