Lines Matching +full:gic +full:- +full:v3 +full:- +full:its
1 /* SPDX-License-Identifier: GPL-2.0-only */
8 #include <linux/irqchip/arm-gic-common.h>
13 #define VGIC_ADDR_UNDEF (-1)
45 * As per Documentation/virt/kvm/devices/arm-vgic-v3.rst,
66 * As per Documentation/virt/kvm/devices/arm-vgic-its.rst,
67 * below macros are defined for ITS table entry encoding.
104 if (irq->config == VGIC_CONFIG_EDGE) in irq_is_pending()
105 return irq->pending_latch; in irq_is_pending()
107 return irq->pending_latch || irq->line_level; in irq_is_pending()
112 return irq->config == VGIC_CONFIG_LEVEL && irq->hw; in vgic_irq_is_mapped_level()
118 if (vgic_irq_is_sgi(irq->intid) && irq->source) in vgic_irq_get_lr_count()
119 return hweight8(irq->source) + irq->active; in vgic_irq_get_lr_count()
121 return irq_is_pending(irq) || irq->active; in vgic_irq_get_lr_count()
131 * in the GICH_VMCR and ICH_VMCR registers, such that code exporting the GIC
133 * registers regardless of the hardware backed GIC used.
204 if (irq->intid < VGIC_MIN_LPI) in vgic_get_irq_kref()
207 kref_get(&irq->refcount); in vgic_get_irq_kref()
260 struct vgic_cpu *cpu_if = &vcpu->arch.vgic_cpu; in vgic_v3_max_apr_idx()
267 switch (cpu_if->num_pri_bits) { in vgic_v3_max_apr_idx()
277 if (!region->count) in vgic_v3_redist_region_full()
280 return (region->free_index >= region->count); in vgic_v3_redist_region_full()
288 if (!rdreg->count) in vgic_v3_rd_region_size()
289 return atomic_read(&kvm->online_vcpus) * KVM_VGIC_V3_REDIST_SIZE; in vgic_v3_rd_region_size()
291 return rdreg->count * KVM_VGIC_V3_REDIST_SIZE; in vgic_v3_rd_region_size()
301 struct vgic_dist *d = &kvm->arch.vgic; in vgic_dist_overlap()
303 return (base + size > d->vgic_dist_base) && in vgic_dist_overlap()
304 (base < d->vgic_dist_base + KVM_VGIC_V3_DIST_SIZE); in vgic_dist_overlap()
308 int vgic_its_resolve_lpi(struct kvm *kvm, struct vgic_its *its,