Lines Matching defs:apqn
37 static struct vfio_ap_queue *vfio_ap_find_queue(int apqn);
136 * @apqn: the APQN of a queue device.
144 * Note: If @apqn is not assigned to a matrix_mdev, the matrix_mdev->kvm->lock
147 * Return: the ap_matrix_mdev object to which @apqn is assigned or NULL if @apqn
150 static struct ap_matrix_mdev *get_update_locks_by_apqn(int apqn)
157 if (test_bit_inv(AP_QID_CARD(apqn), matrix_mdev->matrix.apm) &&
158 test_bit_inv(AP_QID_QUEUE(apqn), matrix_mdev->matrix.aqm)) {
201 * @apqn: The APQN of a queue device
208 int apqn)
213 apqn) {
214 if (q && q->apqn == apqn)
223 * @apqn: The AP Queue number
231 static void vfio_ap_wait_for_irqclear(int apqn)
237 status = ap_tapq(apqn, NULL);
252 status.response_code, apqn);
258 __func__, status.response_code, apqn);
309 status = ap_aqic(q->apqn, aqic_gisa, 0);
313 vfio_ap_wait_for_irqclear(q->apqn);
421 VFIO_AP_DBF_WARN("%s: invalid NIB address: nib=%pad, apqn=%#04x\n",
422 __func__, &nib, q->apqn);
435 "nib=%pad, apqn=%#04x\n",
436 __func__, ret, &nib, q->apqn);
458 VFIO_AP_DBF_WARN("%s: gisc registration failed: nisc=%d, isc=%d, apqn=%#04x\n",
459 __func__, nisc, isc, q->apqn);
470 status = ap_aqic(q->apqn, aqic_gisa, h_nib);
484 pr_warn("%s: apqn %04x: response: %02x\n", __func__, q->apqn,
493 "gisa=%#x, isc=%#x, apqn=%#04x\n",
497 q->apqn);
569 uint16_t apqn;
576 apqn = vcpu->run->s.regs.gprs[0] & 0xffff;
580 VFIO_AP_DBF_WARN("%s: AIV facility not installed: apqn=0x%04x, eca=0x%04x\n",
581 __func__, apqn, vcpu->arch.sie_block->eca);
589 VFIO_AP_DBF_WARN("%s: PQAP(AQIC) hook not registered with the vfio_ap driver: apqn=0x%04x\n",
590 __func__, apqn);
601 VFIO_AP_DBF_WARN("%s: mdev %08lx-%04lx-%04lx-%04lx-%04lx%08lx not in use: apqn=0x%04x\n",
603 uuid[3], uuid[4], uuid[5], apqn);
607 q = vfio_ap_mdev_get_queue(matrix_mdev, apqn);
610 __func__, AP_QID_CARD(apqn),
611 AP_QID_QUEUE(apqn));
684 unsigned long apid, apqi, apqn;
715 apqn = AP_MKQID(apid, apqi);
716 q = vfio_ap_mdev_get_queue(matrix_mdev, apqn);
783 hash_add(matrix_mdev->qtable.queues, &q->mdev_qnode, q->apqn);
787 static void vfio_ap_mdev_link_apqn(struct ap_matrix_mdev *matrix_mdev, int apqn)
791 q = vfio_ap_find_queue(apqn);
1669 static struct vfio_ap_queue *vfio_ap_find_queue(int apqn)
1674 queue = ap_get_qdev(apqn);
1686 static int apq_status_check(int apqn, struct ap_queue_status *status)
1708 AP_QID_CARD(apqn), AP_QID_QUEUE(apqn),
1727 status = ap_tapq(q->apqn, NULL);
1728 ret = apq_status_check(q->apqn, &status);
1733 AP_QID_CARD(q->apqn),
1734 AP_QID_QUEUE(q->apqn),
1743 status = ap_zapq(q->apqn, 0);
1768 status = ap_zapq(q->apqn, 0);
1792 AP_QID_CARD(q->apqn), AP_QID_QUEUE(q->apqn),
2029 unsigned long apid = AP_QID_CARD(q->apqn);
2030 unsigned long apqi = AP_QID_QUEUE(q->apqn);
2060 apid = AP_QID_CARD(q->apqn);
2061 apqi = AP_QID_QUEUE(q->apqn);
2168 q->apqn = to_ap_queue(&apdev->device)->qid;
2172 matrix_mdev = get_update_locks_by_apqn(q->apqn);
2215 apid = AP_QID_CARD(q->apqn);
2216 apqi = AP_QID_QUEUE(q->apqn);