Lines Matching defs: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 != ite->collection)
412 update_affinity_ite(kvm, ite);
677 struct its_ite *ite;
682 ite = find_ite(its, devid, eventid);
683 if (!ite || !its_is_collection_mapped(ite->collection))
686 vcpu = kvm_get_vcpu(kvm, ite->collection->target_addr);
693 vgic_its_cache_translation(kvm, its, devid, eventid, ite->irq);
695 *irq = ite->irq;
812 static void its_free_ite(struct kvm *kvm, struct its_ite *ite)
814 list_del(&ite->ite_list);
817 if (ite->irq) {
818 if (ite->irq->hw)
819 WARN_ON(its_unmap_vlpi(ite->irq->host_irq));
821 vgic_put_irq(kvm, ite->irq);
824 kfree(ite);
851 struct its_ite *ite;
853 ite = find_ite(its, device_id, event_id);
854 if (ite && its_is_collection_mapped(ite->collection)) {
862 its_free_ite(kvm, ite);
880 struct its_ite *ite;
883 ite = find_ite(its, device_id, event_id);
884 if (!ite)
887 if (!its_is_collection_mapped(ite->collection))
894 ite->collection = collection;
899 return update_affinity(ite->irq, vcpu);
1010 struct its_ite *ite;
1021 for_each_lpi_its(device, ite, its)
1022 if (ite->collection &&
1023 ite->collection->collection_id == coll_id)
1024 ite->collection = NULL;
1035 struct its_ite *ite;
1037 ite = kzalloc(sizeof(*ite), GFP_KERNEL);
1038 if (!ite)
1041 ite->event_id = event_id;
1042 ite->collection = collection;
1044 list_add_tail(&ite->ite_list, &device->itt_head);
1045 return ite;
1058 struct its_ite *ite;
1092 ite = vgic_its_alloc_ite(device, collection, event_id);
1093 if (IS_ERR(ite)) {
1096 return PTR_ERR(ite);
1106 its_free_ite(kvm, ite);
1109 ite->irq = irq;
1117 struct its_ite *ite, *temp;
1124 list_for_each_entry_safe(ite, temp, &device->itt_head, ite_list)
1125 its_free_ite(kvm, ite);
1264 struct its_ite *ite;
1267 ite = find_ite(its, device_id, event_id);
1268 if (!ite)
1271 ite->irq->pending_latch = false;
1273 if (ite->irq->hw)
1274 return irq_set_irqchip_state(ite->irq->host_irq,
1289 struct its_ite *ite;
1292 ite = find_ite(its, device_id, event_id);
1293 if (!ite)
1296 return update_lpi_config(kvm, ite->irq, NULL, true);
2051 static u32 compute_next_eventid_offset(struct list_head *h, struct its_ite *ite)
2056 if (list_is_last(&ite->ite_list, h))
2058 next = list_next_entry(ite, ite_list);
2059 next_offset = next->event_id - ite->event_id;
2131 struct its_ite *ite, gpa_t gpa, int ite_esz)
2137 next_offset = compute_next_eventid_offset(&dev->itt_head, ite);
2139 ((u64)ite->irq->intid << KVM_ITS_ITE_PINTID_SHIFT) |
2140 ite->collection->collection_id;
2162 struct its_ite *ite;
2186 ite = vgic_its_alloc_ite(dev, collection, event_id);
2187 if (IS_ERR(ite))
2188 return PTR_ERR(ite);
2196 ite->irq = irq;
2217 struct its_ite *ite;
2223 list_for_each_entry(ite, &device->itt_head, ite_list) {
2224 gpa_t gpa = base + ite->event_id * ite_esz;
2232 if (ite->irq->hw)
2235 ret = vgic_its_save_ite(its, device, ite, gpa, ite_esz);