Lines Matching full:collection
144 struct its_collection *collection; member
158 * @cte_esz: collection table entry size
256 * Finds and returns a collection in the ITS collection table.
261 struct its_collection *collection; in find_collection() local
263 list_for_each_entry(collection, &its->collection_list, coll_list) { in find_collection()
264 if (coll_id == collection->collection_id) in find_collection()
265 return collection; in find_collection()
384 * Needs to be called whenever either the collection for a LPIs has
385 * changed or the collection itself got retargeted.
391 if (!its_is_collection_mapped(ite->collection)) in update_affinity_ite()
394 vcpu = kvm_get_vcpu(kvm, ite->collection->target_addr); in update_affinity_ite()
399 * Updates the target VCPU for every LPI targeting this collection.
409 if (ite->collection != coll) in update_affinity_collection()
679 if (!ite || !its_is_collection_mapped(ite->collection)) in vgic_its_resolve_lpi()
682 vcpu = kvm_get_vcpu(kvm, ite->collection->target_addr); in vgic_its_resolve_lpi()
849 if (ite && its_is_collection_mapped(ite->collection)) { in vgic_its_cmd_handle_discard()
865 * The MOVI command moves an ITTE to a different collection.
876 struct its_collection *collection; in vgic_its_cmd_handle_movi() local
882 if (!its_is_collection_mapped(ite->collection)) in vgic_its_cmd_handle_movi()
885 collection = find_collection(its, coll_id); in vgic_its_cmd_handle_movi()
886 if (!its_is_collection_mapped(collection)) in vgic_its_cmd_handle_movi()
889 ite->collection = collection; in vgic_its_cmd_handle_movi()
890 vcpu = kvm_get_vcpu(kvm, collection->target_addr); in vgic_its_cmd_handle_movi()
931 /* as GITS_TYPER.CIL == 0, ITS supports 16-bit collection ID */ in vgic_its_check_id()
1003 * Add a new collection into the ITS collection table.
1010 struct its_collection *collection; in vgic_its_alloc_collection() local
1012 collection = kzalloc(sizeof(*collection), GFP_KERNEL_ACCOUNT); in vgic_its_alloc_collection()
1013 if (!collection) in vgic_its_alloc_collection()
1016 collection->collection_id = coll_id; in vgic_its_alloc_collection()
1017 collection->target_addr = COLLECTION_NOT_MAPPED; in vgic_its_alloc_collection()
1019 list_add_tail(&collection->coll_list, &its->collection_list); in vgic_its_alloc_collection()
1020 *colp = collection; in vgic_its_alloc_collection()
1027 struct its_collection *collection; in vgic_its_free_collection() local
1032 * Clearing the mapping for that collection ID removes the in vgic_its_free_collection()
1036 collection = find_collection(its, coll_id); in vgic_its_free_collection()
1037 if (!collection) in vgic_its_free_collection()
1041 if (ite->collection && in vgic_its_free_collection()
1042 ite->collection->collection_id == coll_id) in vgic_its_free_collection()
1043 ite->collection = NULL; in vgic_its_free_collection()
1045 list_del(&collection->coll_list); in vgic_its_free_collection()
1046 kfree(collection); in vgic_its_free_collection()
1051 struct its_collection *collection, in vgic_its_alloc_ite() argument
1061 ite->collection = collection; in vgic_its_alloc_ite()
1080 struct its_collection *collection, *new_coll = NULL; in vgic_its_cmd_handle_mapi() local
1103 collection = find_collection(its, coll_id); in vgic_its_cmd_handle_mapi()
1104 if (!collection) { in vgic_its_cmd_handle_mapi()
1110 ret = vgic_its_alloc_collection(its, &collection, coll_id); in vgic_its_cmd_handle_mapi()
1113 new_coll = collection; in vgic_its_cmd_handle_mapi()
1116 ite = vgic_its_alloc_ite(device, collection, event_id); in vgic_its_cmd_handle_mapi()
1123 if (its_is_collection_mapped(collection)) in vgic_its_cmd_handle_mapi()
1124 vcpu = kvm_get_vcpu(kvm, collection->target_addr); in vgic_its_cmd_handle_mapi()
1238 * The MAPC command maps collection IDs to redistributors.
1246 struct its_collection *collection; in vgic_its_cmd_handle_mapc() local
1260 collection = find_collection(its, coll_id); in vgic_its_cmd_handle_mapc()
1262 if (!collection) { in vgic_its_cmd_handle_mapc()
1269 ret = vgic_its_alloc_collection(its, &collection, in vgic_its_cmd_handle_mapc()
1273 collection->target_addr = target_addr; in vgic_its_cmd_handle_mapc()
1275 collection->target_addr = target_addr; in vgic_its_cmd_handle_mapc()
1276 update_affinity_collection(kvm, its, collection); in vgic_its_cmd_handle_mapc()
1337 * collection, and we don't need to hold the its_lock, since no ITS is
1367 * The INVALL command requests flushing of all IRQ data in this collection.
1368 * Find the VCPU mapped to that collection, then iterate over the VM's list
1378 struct its_collection *collection; in vgic_its_cmd_handle_invall() local
1381 collection = find_collection(its, coll_id); in vgic_its_cmd_handle_invall()
1382 if (!its_is_collection_mapped(collection)) in vgic_its_cmd_handle_invall()
1385 vcpu = kvm_get_vcpu(kvm, collection->target_addr); in vgic_its_cmd_handle_invall()
1774 * device/collection BASER are invalid in vgic_mmio_write_its_ctlr()
2207 ite->collection->collection_id; in vgic_its_save_ite()
2222 struct its_collection *collection; in vgic_its_restore_ite() local
2249 collection = find_collection(its, coll_id); in vgic_its_restore_ite()
2250 if (!collection) in vgic_its_restore_ite()
2256 ite = vgic_its_alloc_ite(dev, collection, event_id); in vgic_its_restore_ite()
2260 if (its_is_collection_mapped(collection)) in vgic_its_restore_ite()
2261 vcpu = kvm_get_vcpu(kvm, collection->target_addr); in vgic_its_restore_ite()
2539 struct its_collection *collection, in vgic_its_save_cte() argument
2545 ((u64)collection->target_addr << KVM_ITS_CTE_RDBASE_SHIFT) | in vgic_its_save_cte()
2546 collection->collection_id); in vgic_its_save_cte()
2552 * Restore a collection entry into the ITS collection table.
2558 struct its_collection *collection; in vgic_its_restore_cte() local
2579 collection = find_collection(its, coll_id); in vgic_its_restore_cte()
2580 if (collection) in vgic_its_restore_cte()
2586 ret = vgic_its_alloc_collection(its, &collection, coll_id); in vgic_its_restore_cte()
2589 collection->target_addr = target_addr; in vgic_its_restore_cte()
2594 * vgic_its_save_collection_table - Save the collection table into
2602 struct its_collection *collection; in vgic_its_save_collection_table() local
2612 list_for_each_entry(collection, &its->collection_list, coll_list) { in vgic_its_save_collection_table()
2613 ret = vgic_its_save_cte(its, collection, gpa, cte_esz); in vgic_its_save_collection_table()
2634 * vgic_its_restore_collection_table - reads the collection table