]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/kvm/arm_vgic.h
arm64: KVM: vgic-v2: Add the GICV emulation infrastructure
[karo-tx-linux.git] / include / kvm / arm_vgic.h
index 540da5149ba7f0a6662d550002fc47e618ce30f6..8eb1501fc1d0eac85096591d2088ae2192c8bb0c 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/kvm.h>
 #include <linux/irqreturn.h>
 #include <linux/spinlock.h>
+#include <linux/static_key.h>
 #include <linux/types.h>
 #include <kvm/iodev.h>
 #include <linux/list.h>
@@ -34,6 +35,7 @@
 #define VGIC_MAX_SPI           1019
 #define VGIC_MAX_RESERVED      1023
 #define VGIC_MIN_LPI           8192
+#define KVM_IRQCHIP_NUM_PINS   (1020 - 32)
 
 enum vgic_type {
        VGIC_V2,                /* Good ol' GICv2 */
@@ -264,6 +266,8 @@ struct vgic_cpu {
        bool lpis_enabled;
 };
 
+extern struct static_key_false vgic_v2_cpuif_trap;
+
 int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write);
 void kvm_vgic_early_init(struct kvm *kvm);
 int kvm_vgic_create(struct kvm *kvm, u32 type);
@@ -314,4 +318,10 @@ static inline int kvm_vgic_get_max_vcpus(void)
 
 int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
 
+/**
+ * kvm_vgic_setup_default_irq_routing:
+ * Setup a default flat gsi routing table mapping all SPIs
+ */
+int kvm_vgic_setup_default_irq_routing(struct kvm *kvm);
+
 #endif /* __KVM_ARM_VGIC_H */