Lines Matching full:apid

674  *	 driver, its APID will be filtered from the guest's APCB. The matrix
675 * structure precludes filtering an individual APQN, so its APID will be
687 unsigned long apid, apqi, apqn; in vfio_ap_mdev_filter_matrix() local
707 for_each_set_bit_inv(apid, matrix_mdev->shadow_apcb.apm, AP_DEVICES) { in vfio_ap_mdev_filter_matrix()
715 * the APID since an adapter represents a physical in vfio_ap_mdev_filter_matrix()
718 apqn = AP_MKQID(apid, apqi); in vfio_ap_mdev_filter_matrix()
721 clear_bit_inv(apid, matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_filter_matrix()
726 * the APID was filtered. in vfio_ap_mdev_filter_matrix()
728 if (test_bit_inv(apid, prev_shadow_apm)) in vfio_ap_mdev_filter_matrix()
729 set_bit_inv(apid, apm_filtered); in vfio_ap_mdev_filter_matrix()
811 unsigned long apid, apqi; in vfio_ap_mdev_unlink_fr_queues() local
813 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) { in vfio_ap_mdev_unlink_fr_queues()
817 AP_MKQID(apid, apqi)); in vfio_ap_mdev_unlink_fr_queues()
847 unsigned long apid, apqi; in vfio_ap_mdev_log_sharing_err() local
851 for_each_set_bit_inv(apid, apm, AP_DEVICES) in vfio_ap_mdev_log_sharing_err()
853 dev_warn(dev, MDEV_SHARING_ERR, apid, apqi, mdev_name); in vfio_ap_mdev_log_sharing_err()
933 unsigned long apid) in vfio_ap_mdev_link_adapter() argument
939 AP_MKQID(apid, apqi)); in vfio_ap_mdev_link_adapter()
943 unsigned long apid, in collect_queues_to_reset() argument
950 q = vfio_ap_mdev_get_queue(matrix_mdev, AP_MKQID(apid, apqi)); in collect_queues_to_reset()
957 unsigned long apid) in reset_queues_for_apid() argument
962 collect_queues_to_reset(matrix_mdev, apid, &qlist); in reset_queues_for_apid()
970 unsigned long apid; in reset_queues_for_apids() local
977 for_each_set_bit_inv(apid, apm_reset, AP_DEVICES) in reset_queues_for_apids()
978 collect_queues_to_reset(matrix_mdev, apid, &qlist); in reset_queues_for_apids()
984 * assign_adapter_store - parses the APID from @buf and sets the
989 * @buf: a buffer containing the AP adapter number (APID) to
993 * Return: the number of bytes processed if the APID is valid; otherwise,
997 * The APID is not a valid number
1000 * The APID exceeds the maximum value configured for the system
1003 * An APQN derived from the cross product of the APID being assigned
1005 * driver; or, if no APQIs have yet been assigned, the APID is not
1009 * An APQN derived from the cross product of the APID being assigned
1022 unsigned long apid; in assign_adapter_store() local
1029 ret = kstrtoul(buf, 0, &apid); in assign_adapter_store()
1033 if (apid > matrix_mdev->matrix.apm_max) { in assign_adapter_store()
1038 if (test_bit_inv(apid, matrix_mdev->matrix.apm)) { in assign_adapter_store()
1043 set_bit_inv(apid, matrix_mdev->matrix.apm); in assign_adapter_store()
1047 clear_bit_inv(apid, matrix_mdev->matrix.apm); in assign_adapter_store()
1051 vfio_ap_mdev_link_adapter(matrix_mdev, apid); in assign_adapter_store()
1069 unsigned long apid, unsigned long apqi) in vfio_ap_unlink_apqn_fr_mdev() argument
1073 q = vfio_ap_mdev_get_queue(matrix_mdev, AP_MKQID(apid, apqi)); in vfio_ap_unlink_apqn_fr_mdev()
1086 * @apid: the APID of the unassigned adapter.
1091 unsigned long apid, in vfio_ap_mdev_unlink_adapter() argument
1098 q = vfio_ap_unlink_apqn_fr_mdev(matrix_mdev, apid, apqi); in vfio_ap_mdev_unlink_adapter()
1101 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_unlink_adapter()
1109 unsigned long apid) in vfio_ap_mdev_hot_unplug_adapter() argument
1115 vfio_ap_mdev_unlink_adapter(matrix_mdev, apid, &qlist); in vfio_ap_mdev_hot_unplug_adapter()
1117 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm)) { in vfio_ap_mdev_hot_unplug_adapter()
1118 clear_bit_inv(apid, matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_hot_unplug_adapter()
1131 * unassign_adapter_store - parses the APID from @buf and clears the
1136 * @buf: a buffer containing the adapter number (APID) to be unassigned
1139 * Return: the number of bytes processed if the APID is valid; otherwise,
1141 * -EINVAL if the APID is not a number
1142 * -ENODEV if the APID it exceeds the maximum value configured for the
1150 unsigned long apid; in unassign_adapter_store() local
1155 ret = kstrtoul(buf, 0, &apid); in unassign_adapter_store()
1159 if (apid > matrix_mdev->matrix.apm_max) { in unassign_adapter_store()
1164 if (!test_bit_inv(apid, matrix_mdev->matrix.apm)) { in unassign_adapter_store()
1169 clear_bit_inv((unsigned long)apid, matrix_mdev->matrix.apm); in unassign_adapter_store()
1170 vfio_ap_mdev_hot_unplug_adapter(matrix_mdev, apid); in unassign_adapter_store()
1181 unsigned long apid; in vfio_ap_mdev_link_domain() local
1183 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) in vfio_ap_mdev_link_domain()
1185 AP_MKQID(apid, apqi)); in vfio_ap_mdev_link_domain()
1276 unsigned long apid; in vfio_ap_mdev_unlink_domain() local
1279 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) { in vfio_ap_mdev_unlink_domain()
1280 q = vfio_ap_unlink_apqn_fr_mdev(matrix_mdev, apid, apqi); in vfio_ap_mdev_unlink_domain()
1283 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_unlink_domain()
1493 unsigned long apid; in vfio_ap_mdev_matrix_show() local
1506 for_each_set_bit_inv(apid, matrix->apm, napm_bits) { in vfio_ap_mdev_matrix_show()
1509 n = sprintf(bufpos, "%02lx.%04lx\n", apid, in vfio_ap_mdev_matrix_show()
1516 for_each_set_bit_inv(apid, matrix->apm, napm_bits) { in vfio_ap_mdev_matrix_show()
1517 n = sprintf(bufpos, "%02lx.\n", apid); in vfio_ap_mdev_matrix_show()
2032 unsigned long apid = AP_QID_CARD(q->apqn); in vfio_ap_mdev_for_queue() local
2036 if (test_bit_inv(apid, matrix_mdev->matrix.apm) && in vfio_ap_mdev_for_queue()
2050 unsigned long apid, apqi; in status_show() local
2063 apid = AP_QID_CARD(q->apqn); in status_show()
2071 test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in status_show()
2210 unsigned long apid, apqi; in vfio_ap_mdev_remove_queue() local
2218 apid = AP_QID_CARD(q->apqn); in vfio_ap_mdev_remove_queue()
2223 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_remove_queue()
2230 clear_bit_inv(apid, matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_remove_queue()
2232 reset_queues_for_apid(matrix_mdev, apid); in vfio_ap_mdev_remove_queue()
2242 if (test_bit_inv(apid, (unsigned long *)matrix_dev->info.apm) && in vfio_ap_mdev_remove_queue()
2412 unsigned long apid, apqi; in vfio_ap_filter_apid_by_qtype() local
2415 for_each_set_bit_inv(apid, apm, AP_DEVICES) { in vfio_ap_filter_apid_by_qtype()
2419 status = ap_test_queue(AP_MKQID(apid, apqi), 1, &info); in vfio_ap_filter_apid_by_qtype()
2433 * remove the APID if the adapter is in vfio_ap_filter_apid_by_qtype()
2437 clear_bit_inv(apid, apm); in vfio_ap_filter_apid_by_qtype()
2446 * clear its APID since it can't be in vfio_ap_filter_apid_by_qtype()
2450 clear_bit_inv(apid, apm); in vfio_ap_filter_apid_by_qtype()
2456 * If we've already cleared the APID from the apm, there in vfio_ap_filter_apid_by_qtype()