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.
103 return vcpu->kvm->arch.vgic.implementation_rev; in vgic_get_implementation_rev()
109 if (irq->config == VGIC_CONFIG_EDGE) in irq_is_pending()
110 return irq->pending_latch; in irq_is_pending()
112 return irq->pending_latch || irq->line_level; in irq_is_pending()
117 return irq->config == VGIC_CONFIG_LEVEL && irq->hw; in vgic_irq_is_mapped_level()
123 if (vgic_irq_is_sgi(irq->intid) && irq->source) in vgic_irq_get_lr_count()
124 return hweight8(irq->source) + irq->active; in vgic_irq_get_lr_count()
126 return irq_is_pending(irq) || irq->active; in vgic_irq_get_lr_count()
136 * in the GICH_VMCR and ICH_VMCR registers, such that code exporting the GIC
138 * registers regardless of the hardware backed GIC used.
212 if (irq->intid < VGIC_MIN_LPI) in vgic_get_irq_kref()
215 kref_get(&irq->refcount); in vgic_get_irq_kref()
267 struct vgic_cpu *cpu_if = &vcpu->arch.vgic_cpu; in vgic_v3_max_apr_idx()
274 switch (cpu_if->num_pri_bits) { in vgic_v3_max_apr_idx()
284 if (!region->count) in vgic_v3_redist_region_full()
287 return (region->free_index >= region->count); in vgic_v3_redist_region_full()
295 if (!rdreg->count) in vgic_v3_rd_region_size()
296 return atomic_read(&kvm->online_vcpus) * KVM_VGIC_V3_REDIST_SIZE; in vgic_v3_rd_region_size()
298 return rdreg->count * KVM_VGIC_V3_REDIST_SIZE; in vgic_v3_rd_region_size()
309 struct vgic_dist *d = &kvm->arch.vgic; in vgic_dist_overlap()
311 return (base + size > d->vgic_dist_base) && in vgic_dist_overlap()
312 (base < d->vgic_dist_base + KVM_VGIC_V3_DIST_SIZE); in vgic_dist_overlap()
317 int vgic_its_resolve_lpi(struct kvm *kvm, struct vgic_its *its,