mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
5975a2e095
This adds the API for userspace to instantiate an XICS device in a VM and connect VCPUs to it. The API consists of a new device type for the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which functions similarly to KVM_CAP_IRQ_MPIC, and the KVM_IRQ_LINE ioctl, which is used to assert and deassert interrupt inputs of the XICS. The XICS device has one attribute group, KVM_DEV_XICS_GRP_SOURCES. Each attribute within this group corresponds to the state of one interrupt source. The attribute number is the same as the interrupt source number. This does not support irq routing or irqfd yet. Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
20 lines
307 B
C
20 lines
307 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);
|
|
#endif
|
|
smp_rmb();
|
|
return ret;
|
|
}
|
|
|
|
#endif
|