Lines Matching refs:apid

411 	unsigned long *apid;
423 * apid or apqi specified in @data:
425 * - If @data contains both an apid and apqi value, then @data will be flagged
428 * - If @data contains only an apid value, @data will be flagged as
435 * @data does not contain either an apid or apqi.
444 if (qres->apid && qres->apqi) {
445 qid = AP_MKQID(*qres->apid, *qres->apqi);
448 } else if (qres->apid && !qres->apqi) {
450 if (id == *qres->apid)
452 } else if (!qres->apid && qres->apqi) {
467 * @apid: an AP adapter ID
470 * Verifies that the AP queue with @apid/@apqi is reserved by the VFIO AP device
473 * - If both @apid and @apqi are not NULL, then there must be an AP queue
474 * device bound to the vfio_ap driver with the APQN identified by @apid and
477 * - If only @apid is not NULL, then there must be an AP queue device bound
478 * to the vfio_ap driver with an APQN containing @apid
485 static int vfio_ap_verify_queue_reserved(unsigned long *apid,
491 qres.apid = apid;
508 unsigned long apid)
515 return vfio_ap_verify_queue_reserved(&apid, NULL);
518 ret = vfio_ap_verify_queue_reserved(&apid, &apqi);
605 unsigned long apid;
613 ret = kstrtoul(buf, 0, &apid);
617 if (apid > matrix_mdev->matrix.apm_max)
627 ret = vfio_ap_mdev_verify_queues_reserved_for_apid(matrix_mdev, apid);
631 set_bit_inv(apid, matrix_mdev->matrix.apm);
641 clear_bit_inv(apid, matrix_mdev->matrix.apm);
671 unsigned long apid;
679 ret = kstrtoul(buf, 0, &apid);
683 if (apid > matrix_mdev->matrix.apm_max)
687 clear_bit_inv((unsigned long)apid, matrix_mdev->matrix.apm);
699 unsigned long apid;
705 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, nbits) {
706 ret = vfio_ap_verify_queue_reserved(&apid, &apqi);
959 unsigned long apid;
974 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, napm_bits) {
977 n = sprintf(bufpos, "%02lx.%04lx\n", apid,
984 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, napm_bits) {
985 n = sprintf(bufpos, "%02lx.\n", apid);
1188 unsigned long apid, apqi;
1192 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm,
1196 q = vfio_ap_find_queue(AP_MKQID(apid, apqi));