mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
![Benjamin Herrenschmidt](/assets/img/avatar_default.png)
This patch makes KVM capable of using the XIVE interrupt controller to provide the standard PAPR "XICS" style hypercalls. It is necessary for proper operations when the host uses XIVE natively. This has been lightly tested on an actual system, including PCI pass-through with a TG3 device. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [mpe: Cleanup pr_xxx(), unsplit pr_xxx() strings, etc., fix build failures by adding KVM_XIVE which depends on KVM_XICS and XIVE, and adding empty stubs for the kvm_xive_xxx() routines, fixup subject, integrate fixes from Paul for building PR=y HV=n] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
21 lines
347 B
C
21 lines
347 B
C
#ifndef __IRQ_H
|
|
#define __IRQ_H
|
|
|
|
#include <linux/kvm_host.h>
|
|
|
|
static inline int irqchip_in_kernel(struct kvm *kvm)
|
|
{
|
|
int ret = 0;
|
|
|
|
#ifdef CONFIG_KVM_MPIC
|
|
ret = ret || (kvm->arch.mpic != NULL);
|
|
#endif
|
|
#ifdef CONFIG_KVM_XICS
|
|
ret = ret || (kvm->arch.xics != NULL);
|
|
ret = ret || (kvm->arch.xive != NULL);
|
|
#endif
|
|
smp_rmb();
|
|
return ret;
|
|
}
|
|
|
|
#endif
|