Lines Matching full:apm
157 if (test_bit_inv(AP_QID_CARD(apqn), matrix_mdev->matrix.apm) && in get_update_locks_by_apqn()
645 matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_update_guest_apcb()
706 bitmap_copy(prev_shadow_apm, matrix_mdev->shadow_apcb.apm, AP_DEVICES); in vfio_ap_mdev_filter_matrix()
716 bitmap_and(matrix_mdev->shadow_apcb.apm, matrix_mdev->matrix.apm, in vfio_ap_mdev_filter_matrix()
717 (unsigned long *)matrix_dev->info.apm, AP_DEVICES); in vfio_ap_mdev_filter_matrix()
721 for_each_set_bit_inv(apid, matrix_mdev->shadow_apcb.apm, AP_DEVICES) { in vfio_ap_mdev_filter_matrix()
734 clear_bit_inv(apid, matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_filter_matrix()
749 return !bitmap_equal(prev_shadow_apm, matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_filter_matrix()
827 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) { in vfio_ap_mdev_unlink_fr_queues()
858 unsigned long *apm, in vfio_ap_mdev_log_sharing_err() argument
865 for_each_set_bit_inv(apid, apm, AP_DEVICES) in vfio_ap_mdev_log_sharing_err()
886 DECLARE_BITMAP(apm, AP_DEVICES); in vfio_ap_mdev_verify_no_sharing()
891 * If the input apm and aqm are fields of the matrix_mdev in vfio_ap_mdev_verify_no_sharing()
894 if (mdev_apm == matrix_mdev->matrix.apm && in vfio_ap_mdev_verify_no_sharing()
898 memset(apm, 0, sizeof(apm)); in vfio_ap_mdev_verify_no_sharing()
905 if (!bitmap_and(apm, mdev_apm, matrix_mdev->matrix.apm, in vfio_ap_mdev_verify_no_sharing()
913 vfio_ap_mdev_log_sharing_err(matrix_mdev, apm, aqm); in vfio_ap_mdev_verify_no_sharing()
938 if (ap_apqn_in_matrix_owned_by_def_drv(matrix_mdev->matrix.apm, in vfio_ap_mdev_validate_masks()
942 return vfio_ap_mdev_verify_no_sharing(matrix_mdev->matrix.apm, in vfio_ap_mdev_validate_masks()
999 * corresponding bit in the mediated matrix device's APM
1052 if (test_bit_inv(apid, matrix_mdev->matrix.apm)) { in assign_adapter_store()
1057 set_bit_inv(apid, matrix_mdev->matrix.apm); in assign_adapter_store()
1061 clear_bit_inv(apid, matrix_mdev->matrix.apm); in assign_adapter_store()
1115 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_unlink_adapter()
1135 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm)) { in vfio_ap_mdev_hot_unplug_adapters()
1136 clear_bit_inv(apid, matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_hot_unplug_adapters()
1165 * corresponding bit in the mediated matrix device's APM
1197 if (!test_bit_inv(apid, matrix_mdev->matrix.apm)) { in unassign_adapter_store()
1202 clear_bit_inv((unsigned long)apid, matrix_mdev->matrix.apm); in unassign_adapter_store()
1216 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) in vfio_ap_mdev_link_domain()
1312 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) { in vfio_ap_mdev_unlink_domain()
1316 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_unlink_domain()
1554 apid1 = find_first_bit_inv(matrix->apm, napm_bits); in vfio_ap_mdev_matrix_show()
1558 for_each_set_bit_inv(apid, matrix->apm, napm_bits) { in vfio_ap_mdev_matrix_show()
1568 for_each_set_bit_inv(apid, matrix->apm, napm_bits) { in vfio_ap_mdev_matrix_show()
1624 idx += write_ap_bitmap(matrix_mdev->matrix.apm, buf, idx, ','); in ap_config_show()
1652 for_each_set_bit_inv(bit, matrix_mdev->matrix.apm, AP_DEVICES) { in ap_matrix_overflow_check()
1676 bitmap_copy(dst->apm, src->apm, AP_DEVICES); in ap_matrix_copy()
1702 if (parse_bitmap(&rest, m_new.apm, AP_DEVICES) || in ap_config_store()
1709 bitmap_andnot(m_removed.apm, m_old.apm, m_new.apm, AP_DEVICES); in ap_config_store()
1711 bitmap_andnot(m_added.apm, m_new.apm, m_old.apm, AP_DEVICES); in ap_config_store()
1734 vfio_ap_mdev_hot_unplug_adapters(matrix_mdev, m_removed.apm); in ap_config_store()
1741 for_each_set_bit_inv(newbit, m_added.apm, AP_DEVICES) in ap_config_store()
2229 if (test_bit_inv(apid, matrix_mdev->matrix.apm) && in vfio_ap_mdev_for_queue()
2264 test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in status_show()
2416 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_remove_queue()
2423 clear_bit_inv(apid, matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_remove_queue()
2435 if (test_bit_inv(apid, (unsigned long *)matrix_dev->info.apm) && in vfio_ap_mdev_remove_queue()
2455 * @apm: a bitmap specifying a set of APIDs comprising the APQNs to check.
2459 * * -EADDRINUSE if one or more of the APQNs specified via @apm/@aqm are
2464 int vfio_ap_mdev_resource_in_use(unsigned long *apm, unsigned long *aqm) in vfio_ap_mdev_resource_in_use() argument
2470 ret = vfio_ap_mdev_verify_no_sharing(apm, aqm); in vfio_ap_mdev_resource_in_use()
2496 do_hotplug |= bitmap_andnot(matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_hot_unplug_cfg()
2497 matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_hot_unplug_cfg()
2544 matrix_mdev->matrix.apm, in vfio_ap_mdev_cfg_remove()
2579 (unsigned long *)prev_config_info->apm, in vfio_ap_mdev_on_cfg_remove()
2580 (unsigned long *)cur_config_info->apm, in vfio_ap_mdev_on_cfg_remove()
2598 * @apm: a bitmap of the APIDs to examine
2601 static void vfio_ap_filter_apid_by_qtype(unsigned long *apm, unsigned long *aqm) in vfio_ap_filter_apid_by_qtype() argument
2608 for_each_set_bit_inv(apid, apm, AP_DEVICES) { in vfio_ap_filter_apid_by_qtype()
2630 clear_bit_inv(apid, apm); in vfio_ap_filter_apid_by_qtype()
2643 clear_bit_inv(apid, apm); in vfio_ap_filter_apid_by_qtype()
2649 * If we've already cleared the APID from the apm, there in vfio_ap_filter_apid_by_qtype()
2684 matrix_mdev->matrix.apm, apm_add, AP_DEVICES); in vfio_ap_mdev_cfg_add()
2712 (unsigned long *)cur_config_info->apm, in vfio_ap_mdev_on_cfg_add()
2713 (unsigned long *)prev_config_info->apm, in vfio_ap_mdev_on_cfg_add()
2758 filter_adapters = bitmap_intersects(matrix_mdev->matrix.apm, in vfio_ap_mdev_hot_plug_cfg()