Lines Matching refs:apid
411 unsigned long *apid; member
444 if (qres->apid && qres->apqi) { in vfio_ap_has_queue()
445 qid = AP_MKQID(*qres->apid, *qres->apqi); in vfio_ap_has_queue()
448 } else if (qres->apid && !qres->apqi) { in vfio_ap_has_queue()
450 if (id == *qres->apid) in vfio_ap_has_queue()
452 } else if (!qres->apid && qres->apqi) { in vfio_ap_has_queue()
485 static int vfio_ap_verify_queue_reserved(unsigned long *apid, in vfio_ap_verify_queue_reserved() argument
491 qres.apid = apid; in vfio_ap_verify_queue_reserved()
508 unsigned long apid) in vfio_ap_mdev_verify_queues_reserved_for_apid() argument
515 return vfio_ap_verify_queue_reserved(&apid, NULL); in vfio_ap_mdev_verify_queues_reserved_for_apid()
518 ret = vfio_ap_verify_queue_reserved(&apid, &apqi); in vfio_ap_mdev_verify_queues_reserved_for_apid()
605 unsigned long apid; in assign_adapter_store() local
613 ret = kstrtoul(buf, 0, &apid); in assign_adapter_store()
617 if (apid > matrix_mdev->matrix.apm_max) in assign_adapter_store()
627 ret = vfio_ap_mdev_verify_queues_reserved_for_apid(matrix_mdev, apid); in assign_adapter_store()
631 set_bit_inv(apid, matrix_mdev->matrix.apm); in assign_adapter_store()
641 clear_bit_inv(apid, matrix_mdev->matrix.apm); in assign_adapter_store()
671 unsigned long apid; in unassign_adapter_store() local
679 ret = kstrtoul(buf, 0, &apid); in unassign_adapter_store()
683 if (apid > matrix_mdev->matrix.apm_max) in unassign_adapter_store()
687 clear_bit_inv((unsigned long)apid, matrix_mdev->matrix.apm); in unassign_adapter_store()
699 unsigned long apid; in vfio_ap_mdev_verify_queues_reserved_for_apqi() local
705 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, nbits) { in vfio_ap_mdev_verify_queues_reserved_for_apqi()
706 ret = vfio_ap_verify_queue_reserved(&apid, &apqi); in vfio_ap_mdev_verify_queues_reserved_for_apqi()
959 unsigned long apid; in matrix_show() local
974 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, napm_bits) { in matrix_show()
977 n = sprintf(bufpos, "%02lx.%04lx\n", apid, in matrix_show()
984 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, napm_bits) { in matrix_show()
985 n = sprintf(bufpos, "%02lx.\n", apid); in matrix_show()
1188 unsigned long apid, apqi; in vfio_ap_mdev_reset_queues() local
1192 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, in vfio_ap_mdev_reset_queues()
1196 q = vfio_ap_find_queue(AP_MKQID(apid, apqi)); in vfio_ap_mdev_reset_queues()