Lines Matching full:ite

214                        const ITEntry *ite)  in update_ite()  argument
222 trace_gicv3_its_ite_write(dte->ittaddr, eventid, ite->valid, in update_ite()
223 ite->inttype, ite->intid, ite->icid, in update_ite()
224 ite->vpeid, ite->doorbell); in update_ite()
226 if (ite->valid) { in update_ite()
228 itel = FIELD_DP64(itel, ITE_L, INTTYPE, ite->inttype); in update_ite()
229 itel = FIELD_DP64(itel, ITE_L, INTID, ite->intid); in update_ite()
230 itel = FIELD_DP64(itel, ITE_L, ICID, ite->icid); in update_ite()
231 itel = FIELD_DP64(itel, ITE_L, VPEID, ite->vpeid); in update_ite()
232 iteh = FIELD_DP32(iteh, ITE_H, DOORBELL, ite->doorbell); in update_ite()
246 * struct @ite accordingly. If there is an error reading memory then we return
250 const DTEntry *dte, ITEntry *ite) in get_ite() argument
270 ite->valid = FIELD_EX64(itel, ITE_L, VALID); in get_ite()
271 ite->inttype = FIELD_EX64(itel, ITE_L, INTTYPE); in get_ite()
272 ite->intid = FIELD_EX64(itel, ITE_L, INTID); in get_ite()
273 ite->icid = FIELD_EX64(itel, ITE_L, ICID); in get_ite()
274 ite->vpeid = FIELD_EX64(itel, ITE_L, VPEID); in get_ite()
275 ite->doorbell = FIELD_EX64(iteh, ITE_H, DOORBELL); in get_ite()
276 trace_gicv3_its_ite_read(dte->ittaddr, eventid, ite->valid, in get_ite()
277 ite->inttype, ite->intid, ite->icid, in get_ite()
278 ite->vpeid, ite->doorbell); in get_ite()
351 * Given a (DeviceID, EventID), look up the corresponding ITE, including
352 * checking for the various invalid-value cases. If we find a valid ITE,
353 * fill in @ite and @dte and return CMD_CONTINUE_OK. Otherwise return
354 * CMD_STALL or CMD_CONTINUE as appropriate (and the contents of @ite
361 uint32_t devid, uint32_t eventid, ITEntry *ite, in lookup_ite() argument
391 if (get_ite(s, eventid, dte, ite) != MEMTX_OK) { in lookup_ite()
395 if (!ite->valid) { in lookup_ite()
397 "%s: invalid command attributes: invalid ITE\n", who); in lookup_ite()
465 static ItsCmdResult process_its_cmd_phys(GICv3ITSState *s, const ITEntry *ite, in process_its_cmd_phys() argument
471 cmdres = lookup_cte(s, __func__, ite->icid, &cte); in process_its_cmd_phys()
475 gicv3_redist_process_lpi(&s->gicv3->cpu[cte.rdbase], ite->intid, irqlevel); in process_its_cmd_phys()
479 static ItsCmdResult process_its_cmd_virt(GICv3ITSState *s, const ITEntry *ite, in process_its_cmd_virt() argument
485 cmdres = lookup_vte(s, __func__, ite->vpeid, &vte); in process_its_cmd_virt()
490 if (!intid_in_lpi_range(ite->intid) || in process_its_cmd_virt()
491 ite->intid >= (1ULL << (vte.vptsize + 1))) { in process_its_cmd_virt()
493 __func__, ite->intid); in process_its_cmd_virt()
501 gicv3_redist_process_vlpi(&s->gicv3->cpu[vte.rdbase], ite->intid, in process_its_cmd_virt()
502 vte.vptaddr << 16, ite->doorbell, irqlevel); in process_its_cmd_virt()
518 ITEntry ite = {}; in do_process_its_cmd() local
522 cmdres = lookup_ite(s, __func__, devid, eventid, &ite, &dte); in do_process_its_cmd()
529 switch (ite.inttype) { in do_process_its_cmd()
531 cmdres = process_its_cmd_phys(s, &ite, irqlevel); in do_process_its_cmd()
537 "%s: invalid type %d in ITE (table corrupted?)\n", in do_process_its_cmd()
538 __func__, ite.inttype); in do_process_its_cmd()
541 cmdres = process_its_cmd_virt(s, &ite, irqlevel); in do_process_its_cmd()
587 ITEntry ite = {}; in process_mapti() local
639 /* add ite entry to interrupt translation table */ in process_mapti()
640 ite.valid = true; in process_mapti()
641 ite.inttype = ITE_INTTYPE_PHYSICAL; in process_mapti()
642 ite.intid = pIntid; in process_mapti()
643 ite.icid = icid; in process_mapti()
644 ite.doorbell = INTID_SPURIOUS; in process_mapti()
645 ite.vpeid = 0; in process_mapti()
646 return update_ite(s, eventid, &dte, &ite) ? CMD_CONTINUE_OK : CMD_STALL; in process_mapti()
655 ITEntry ite = {}; in process_vmapti() local
718 /* add ite entry to interrupt translation table */ in process_vmapti()
719 ite.valid = true; in process_vmapti()
720 ite.inttype = ITE_INTTYPE_VIRTUAL; in process_vmapti()
721 ite.intid = vintid; in process_vmapti()
722 ite.icid = 0; in process_vmapti()
723 ite.doorbell = doorbell; in process_vmapti()
724 ite.vpeid = vpeid; in process_vmapti()
725 return update_ite(s, eventid, &dte, &ite) ? CMD_CONTINUE_OK : CMD_STALL; in process_vmapti()
907 "%s: invalid command attributes: invalid ITE\n", in process_movi()
1089 ITEntry ite = {}; in process_vmovi() local
1111 cmdres = lookup_ite(s, __func__, devid, eventid, &ite, &dte); in process_vmovi()
1116 if (ite.inttype != ITE_INTTYPE_VIRTUAL) { in process_vmovi()
1117 qemu_log_mask(LOG_GUEST_ERROR, "%s: ITE is not for virtual interrupt\n", in process_vmovi()
1122 cmdres = lookup_vte(s, __func__, ite.vpeid, &old_vte); in process_vmovi()
1131 if (!intid_in_lpi_range(ite.intid) || in process_vmovi()
1132 ite.intid >= (1ULL << (old_vte.vptsize + 1)) || in process_vmovi()
1133 ite.intid >= (1ULL << (new_vte.vptsize + 1))) { in process_vmovi()
1135 "%s: ITE intid 0x%x out of range\n", in process_vmovi()
1136 __func__, ite.intid); in process_vmovi()
1140 ite.vpeid = vpeid; in process_vmovi()
1142 ite.doorbell = doorbell; in process_vmovi()
1155 ite.intid, in process_vmovi()
1156 ite.doorbell); in process_vmovi()
1159 /* Update the ITE to the new VPEID and possibly doorbell values */ in process_vmovi()
1160 return update_ite(s, eventid, &dte, &ite) ? CMD_CONTINUE_OK : CMD_STALL; in process_vmovi()
1189 ITEntry ite = {}; in process_inv() local
1200 cmdres = lookup_ite(s, __func__, devid, eventid, &ite, &dte); in process_inv()
1205 switch (ite.inttype) { in process_inv()
1207 cmdres = lookup_cte(s, __func__, ite.icid, &cte); in process_inv()
1211 gicv3_redist_inv_lpi(&s->gicv3->cpu[cte.rdbase], ite.intid); in process_inv()
1217 "%s: invalid type %d in ITE (table corrupted?)\n", in process_inv()
1218 __func__, ite.inttype); in process_inv()
1222 cmdres = lookup_vte(s, __func__, ite.vpeid, &vte); in process_inv()
1226 if (!intid_in_lpi_range(ite.intid) || in process_inv()
1227 ite.intid >= (1ULL << (vte.vptsize + 1))) { in process_inv()
1229 __func__, ite.intid); in process_inv()
1232 gicv3_redist_inv_vlpi(&s->gicv3->cpu[vte.rdbase], ite.intid, in process_inv()