Lines Matching refs:ite
230 struct its_ite *ite;
236 list_for_each_entry(ite, &device->itt_head, ite_list)
237 if (ite->event_id == event_id)
238 return ite;
244 #define for_each_lpi_its(dev, ite, its) \
246 list_for_each_entry(ite, &(dev)->itt_head, ite_list)
387 static void update_affinity_ite(struct kvm *kvm, struct its_ite *ite)
391 if (!its_is_collection_mapped(ite->collection))
394 vcpu = kvm_get_vcpu(kvm, ite->collection->target_addr);
395 update_affinity(ite->irq, vcpu);
406 struct its_ite *ite;
408 for_each_lpi_its(device, ite, its) {
409 if (ite->collection != coll)
412 update_affinity_ite(kvm, ite);
680 struct its_ite *ite;
685 ite = find_ite(its, devid, eventid);
686 if (!ite || !its_is_collection_mapped(ite->collection))
689 vcpu = kvm_get_vcpu(kvm, ite->collection->target_addr);
696 vgic_its_cache_translation(kvm, its, devid, eventid, ite->irq);
698 *irq = ite->irq;
815 static void its_free_ite(struct kvm *kvm, struct its_ite *ite)
817 list_del(&ite->ite_list);
820 if (ite->irq) {
821 if (ite->irq->hw)
822 WARN_ON(its_unmap_vlpi(ite->irq->host_irq));
824 vgic_put_irq(kvm, ite->irq);
827 kfree(ite);
854 struct its_ite *ite;
856 ite = find_ite(its, device_id, event_id);
857 if (ite && its_is_collection_mapped(ite->collection)) {
865 its_free_ite(kvm, ite);
883 struct its_ite *ite;
886 ite = find_ite(its, device_id, event_id);
887 if (!ite)
890 if (!its_is_collection_mapped(ite->collection))
897 ite->collection = collection;
902 return update_affinity(ite->irq, vcpu);
1037 struct its_ite *ite;
1048 for_each_lpi_its(device, ite, its)
1049 if (ite->collection &&
1050 ite->collection->collection_id == coll_id)
1051 ite->collection = NULL;
1062 struct its_ite *ite;
1064 ite = kzalloc(sizeof(*ite), GFP_KERNEL_ACCOUNT);
1065 if (!ite)
1068 ite->event_id = event_id;
1069 ite->collection = collection;
1071 list_add_tail(&ite->ite_list, &device->itt_head);
1072 return ite;
1085 struct its_ite *ite;
1124 ite = vgic_its_alloc_ite(device, collection, event_id);
1125 if (IS_ERR(ite)) {
1128 return PTR_ERR(ite);
1138 its_free_ite(kvm, ite);
1141 ite->irq = irq;
1149 struct its_ite *ite, *temp;
1156 list_for_each_entry_safe(ite, temp, &device->itt_head, ite_list)
1157 its_free_ite(kvm, ite);
1300 struct its_ite *ite;
1303 ite = find_ite(its, device_id, event_id);
1304 if (!ite)
1307 ite->irq->pending_latch = false;
1309 if (ite->irq->hw)
1310 return irq_set_irqchip_state(ite->irq->host_irq,
1330 struct its_ite *ite;
1333 ite = find_ite(its, device_id, event_id);
1334 if (!ite)
1337 return vgic_its_inv_lpi(kvm, ite->irq);
2128 static u32 compute_next_eventid_offset(struct list_head *h, struct its_ite *ite)
2133 if (list_is_last(&ite->ite_list, h))
2135 next = list_next_entry(ite, ite_list);
2136 next_offset = next->event_id - ite->event_id;
2208 struct its_ite *ite, gpa_t gpa, int ite_esz)
2214 next_offset = compute_next_eventid_offset(&dev->itt_head, ite);
2216 ((u64)ite->irq->intid << KVM_ITS_ITE_PINTID_SHIFT) |
2217 ite->collection->collection_id;
2239 struct its_ite *ite;
2266 ite = vgic_its_alloc_ite(dev, collection, event_id);
2267 if (IS_ERR(ite))
2268 return PTR_ERR(ite);
2275 its_free_ite(kvm, ite);
2278 ite->irq = irq;
2299 struct its_ite *ite;
2305 list_for_each_entry(ite, &device->itt_head, ite_list) {
2306 gpa_t gpa = base + ite->event_id * ite_esz;
2314 if (ite->irq->hw && !kvm_vgic_global_state.has_gicv4_1)
2317 ret = vgic_its_save_ite(its, device, ite, gpa, ite_esz);