mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 13:32:50 +07:00
5af5099385
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>
22 lines
347 B
C
22 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
|