Lines Matching refs:dist

54 	struct vgic_dist *dist = &kvm->arch.vgic;  in kvm_vgic_early_init()  local
56 xa_init_flags(&dist->lpi_xa, XA_FLAGS_LOCK_IRQ); in kvm_vgic_early_init()
140 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_dist_init() local
144 dist->spis = kcalloc(nr_spis, sizeof(struct vgic_irq), GFP_KERNEL_ACCOUNT); in kvm_vgic_dist_init()
145 if (!dist->spis) in kvm_vgic_dist_init()
157 struct vgic_irq *irq = &dist->spis[i]; in kvm_vgic_dist_init()
165 switch (dist->vgic_model) { in kvm_vgic_dist_init()
175 kfree(dist->spis); in kvm_vgic_dist_init()
176 dist->spis = NULL; in kvm_vgic_dist_init()
249 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in kvm_vgic_vcpu_init() local
269 if (dist->vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) { in kvm_vgic_vcpu_init()
296 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_init() local
311 if (!dist->nr_spis) in vgic_init()
312 dist->nr_spis = VGIC_NR_IRQS_LEGACY - VGIC_NR_PRIVATE_IRQS; in vgic_init()
314 ret = kvm_vgic_dist_init(kvm, dist->nr_spis); in vgic_init()
327 switch (dist->vgic_model) { in vgic_init()
371 if (!dist->implementation_rev) in vgic_init()
372 dist->implementation_rev = KVM_VGIC_IMP_REV_LATEST; in vgic_init()
373 dist->initialized = true; in vgic_init()
381 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_dist_destroy() local
384 dist->ready = false; in kvm_vgic_dist_destroy()
385 dist->initialized = false; in kvm_vgic_dist_destroy()
387 kfree(dist->spis); in kvm_vgic_dist_destroy()
388 dist->spis = NULL; in kvm_vgic_dist_destroy()
389 dist->nr_spis = 0; in kvm_vgic_dist_destroy()
390 dist->vgic_dist_base = VGIC_ADDR_UNDEF; in kvm_vgic_dist_destroy()
392 if (dist->vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) { in kvm_vgic_dist_destroy()
393 list_for_each_entry_safe(rdreg, next, &dist->rd_regions, list) in kvm_vgic_dist_destroy()
395 INIT_LIST_HEAD(&dist->rd_regions); in kvm_vgic_dist_destroy()
397 dist->vgic_cpu_base = VGIC_ADDR_UNDEF; in kvm_vgic_dist_destroy()
403 xa_destroy(&dist->lpi_xa); in kvm_vgic_dist_destroy()
520 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_map_resources() local
536 if (dist->vgic_model == KVM_DEV_TYPE_ARM_VGIC_V2) { in kvm_vgic_map_resources()
547 dist_base = dist->vgic_dist_base; in kvm_vgic_map_resources()
563 dist->ready = true; in kvm_vgic_map_resources()