Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / include / kvm / arm_vgic.h
index 6186749..540da51 100644 (file)
@@ -77,6 +77,7 @@ enum vgic_irq_config {
 
 struct vgic_irq {
        spinlock_t irq_lock;            /* Protects the content of the struct */
+       struct list_head lpi_list;      /* Used to link all LPIs together */
        struct list_head ap_list;
 
        struct kvm_vcpu *vcpu;          /* SGIs and PPIs: The VCPU
@@ -137,6 +138,7 @@ struct vgic_its {
        bool                    enabled;
        bool                    initialized;
        struct vgic_io_device   iodev;
+       struct kvm_device       *dev;
 
        /* These registers correspond to GITS_BASER{0,1} */
        u64                     baser_device_table;
@@ -162,6 +164,9 @@ struct vgic_dist {
        /* vGIC model the kernel emulates for the guest (GICv2 or GICv3) */
        u32                     vgic_model;
 
+       /* Do injected MSIs require an additional device ID? */
+       bool                    msis_require_devid;
+
        int                     nr_spis;
 
        /* TODO: Consider moving to global state */
@@ -193,6 +198,11 @@ struct vgic_dist {
         * GICv3 spec: 6.1.2 "LPI Configuration tables"
         */
        u64                     propbaser;
+
+       /* Protects the lpi_list and the count value below. */
+       spinlock_t              lpi_list_lock;
+       struct list_head        lpi_list_head;
+       int                     lpi_list_count;
 };
 
 struct vgic_v2_cpu_if {
@@ -302,4 +312,6 @@ static inline int kvm_vgic_get_max_vcpus(void)
        return kvm_vgic_global_state.max_gic_vcpus;
 }
 
+int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
+
 #endif /* __KVM_ARM_VGIC_H */