Lines Matching refs:apm

157 		if (test_bit_inv(AP_QID_CARD(apqn), matrix_mdev->matrix.apm) &&  in get_update_locks_by_apqn()
611 matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_update_guest_apcb()
644 static bool vfio_ap_mdev_filter_matrix(unsigned long *apm, unsigned long *aqm, in vfio_ap_mdev_filter_matrix() argument
652 bitmap_copy(prev_shadow_apm, matrix_mdev->shadow_apcb.apm, AP_DEVICES); in vfio_ap_mdev_filter_matrix()
661 bitmap_and(matrix_mdev->shadow_apcb.apm, matrix_mdev->matrix.apm, in vfio_ap_mdev_filter_matrix()
662 (unsigned long *)matrix_dev->info.apm, AP_DEVICES); in vfio_ap_mdev_filter_matrix()
666 for_each_set_bit_inv(apid, apm, AP_DEVICES) { in vfio_ap_mdev_filter_matrix()
680 matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_filter_matrix()
686 return !bitmap_equal(prev_shadow_apm, matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_filter_matrix()
762 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) { in vfio_ap_mdev_unlink_fr_queues()
793 unsigned long *apm, in vfio_ap_mdev_log_sharing_err() argument
800 for_each_set_bit_inv(apid, apm, AP_DEVICES) in vfio_ap_mdev_log_sharing_err()
821 DECLARE_BITMAP(apm, AP_DEVICES); in vfio_ap_mdev_verify_no_sharing()
829 if (mdev_apm == matrix_mdev->matrix.apm && in vfio_ap_mdev_verify_no_sharing()
833 memset(apm, 0, sizeof(apm)); in vfio_ap_mdev_verify_no_sharing()
840 if (!bitmap_and(apm, mdev_apm, matrix_mdev->matrix.apm, in vfio_ap_mdev_verify_no_sharing()
848 vfio_ap_mdev_log_sharing_err(matrix_mdev, apm, aqm); in vfio_ap_mdev_verify_no_sharing()
873 if (ap_apqn_in_matrix_owned_by_def_drv(matrix_mdev->matrix.apm, in vfio_ap_mdev_validate_masks()
877 return vfio_ap_mdev_verify_no_sharing(matrix_mdev->matrix.apm, in vfio_ap_mdev_validate_masks()
946 if (test_bit_inv(apid, matrix_mdev->matrix.apm)) { in assign_adapter_store()
951 set_bit_inv(apid, matrix_mdev->matrix.apm); in assign_adapter_store()
955 clear_bit_inv(apid, matrix_mdev->matrix.apm); in assign_adapter_store()
1009 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_unlink_adapter()
1027 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm)) { in vfio_ap_mdev_hot_unplug_adapter()
1028 clear_bit_inv(apid, matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_hot_unplug_adapter()
1076 if (!test_bit_inv(apid, matrix_mdev->matrix.apm)) { in unassign_adapter_store()
1081 clear_bit_inv((unsigned long)apid, matrix_mdev->matrix.apm); in unassign_adapter_store()
1095 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) in vfio_ap_mdev_link_domain()
1172 if (vfio_ap_mdev_filter_matrix(matrix_mdev->matrix.apm, aqm_delta, in assign_domain_store()
1192 for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, AP_DEVICES) { in vfio_ap_mdev_unlink_domain()
1196 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_unlink_domain()
1419 apid1 = find_first_bit_inv(matrix->apm, napm_bits); in vfio_ap_mdev_matrix_show()
1423 for_each_set_bit_inv(apid, matrix->apm, napm_bits) { in vfio_ap_mdev_matrix_show()
1433 for_each_set_bit_inv(apid, matrix->apm, napm_bits) { in vfio_ap_mdev_matrix_show()
1789 if (test_bit_inv(apid, matrix_mdev->matrix.apm) && in vfio_ap_mdev_for_queue()
1914 if (vfio_ap_mdev_filter_matrix(matrix_mdev->matrix.apm, in vfio_ap_mdev_probe_queue()
1950 if (test_bit_inv(apid, matrix_mdev->shadow_apcb.apm) && in vfio_ap_mdev_remove_queue()
1952 clear_bit_inv(apid, matrix_mdev->shadow_apcb.apm); in vfio_ap_mdev_remove_queue()
1977 int vfio_ap_mdev_resource_in_use(unsigned long *apm, unsigned long *aqm) in vfio_ap_mdev_resource_in_use() argument
1983 ret = vfio_ap_mdev_verify_no_sharing(apm, aqm); in vfio_ap_mdev_resource_in_use()
2009 do_hotplug |= bitmap_andnot(matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_hot_unplug_cfg()
2010 matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_hot_unplug_cfg()
2057 matrix_mdev->matrix.apm, in vfio_ap_mdev_cfg_remove()
2092 (unsigned long *)prev_config_info->apm, in vfio_ap_mdev_on_cfg_remove()
2093 (unsigned long *)cur_config_info->apm, in vfio_ap_mdev_on_cfg_remove()
2114 static void vfio_ap_filter_apid_by_qtype(unsigned long *apm, unsigned long *aqm) in vfio_ap_filter_apid_by_qtype() argument
2121 for_each_set_bit_inv(apid, apm, AP_DEVICES) { in vfio_ap_filter_apid_by_qtype()
2145 clear_bit_inv(apid, apm); in vfio_ap_filter_apid_by_qtype()
2158 clear_bit_inv(apid, apm); in vfio_ap_filter_apid_by_qtype()
2199 matrix_mdev->matrix.apm, apm_add, AP_DEVICES); in vfio_ap_mdev_cfg_add()
2227 (unsigned long *)cur_config_info->apm, in vfio_ap_mdev_on_cfg_add()
2228 (unsigned long *)prev_config_info->apm, in vfio_ap_mdev_on_cfg_add()
2270 DECLARE_BITMAP(apm, AP_DEVICES); in vfio_ap_mdev_hot_plug_cfg()
2276 filter_adapters = bitmap_and(apm, matrix_mdev->matrix.apm, in vfio_ap_mdev_hot_plug_cfg()
2282 do_hotplug |= vfio_ap_mdev_filter_matrix(apm, aqm, matrix_mdev); in vfio_ap_mdev_hot_plug_cfg()
2285 vfio_ap_mdev_filter_matrix(apm, in vfio_ap_mdev_hot_plug_cfg()
2290 vfio_ap_mdev_filter_matrix(matrix_mdev->shadow_apcb.apm, in vfio_ap_mdev_hot_plug_cfg()