Lines Matching full:kvg
161 struct kvm_vfio_group *kvg; in kvm_vfio_update_coherency() local
165 list_for_each_entry(kvg, &kv->group_list, node) { in kvm_vfio_update_coherency()
166 if (!kvm_vfio_group_is_coherent(kvg->vfio_group)) { in kvm_vfio_update_coherency()
188 struct kvm_vfio_group *kvg; in kvm_vfio_set_group() local
211 list_for_each_entry(kvg, &kv->group_list, node) { in kvm_vfio_set_group()
212 if (kvg->vfio_group == vfio_group) { in kvm_vfio_set_group()
219 kvg = kzalloc(sizeof(*kvg), GFP_KERNEL_ACCOUNT); in kvm_vfio_set_group()
220 if (!kvg) { in kvm_vfio_set_group()
226 list_add_tail(&kvg->node, &kv->group_list); in kvm_vfio_set_group()
227 kvg->vfio_group = vfio_group; in kvm_vfio_set_group()
251 list_for_each_entry(kvg, &kv->group_list, node) { in kvm_vfio_set_group()
252 if (!kvm_vfio_external_group_match_file(kvg->vfio_group, in kvm_vfio_set_group()
256 list_del(&kvg->node); in kvm_vfio_set_group()
260 kvg->vfio_group); in kvm_vfio_set_group()
262 kvm_vfio_group_set_kvm(kvg->vfio_group, NULL); in kvm_vfio_set_group()
263 kvm_vfio_group_put_external_user(kvg->vfio_group); in kvm_vfio_set_group()
264 kfree(kvg); in kvm_vfio_set_group()
282 struct kvm_vfio_group *kvg; in kvm_vfio_set_group() local
310 list_for_each_entry(kvg, &kv->group_list, node) { in kvm_vfio_set_group()
311 if (kvg->vfio_group != vfio_group) in kvm_vfio_set_group()
366 struct kvm_vfio_group *kvg, *tmp; in kvm_vfio_destroy() local
368 list_for_each_entry_safe(kvg, tmp, &kv->group_list, node) { in kvm_vfio_destroy()
370 kvm_spapr_tce_release_vfio_group(dev->kvm, kvg->vfio_group); in kvm_vfio_destroy()
372 kvm_vfio_group_set_kvm(kvg->vfio_group, NULL); in kvm_vfio_destroy()
373 kvm_vfio_group_put_external_user(kvg->vfio_group); in kvm_vfio_destroy()
374 list_del(&kvg->node); in kvm_vfio_destroy()
375 kfree(kvg); in kvm_vfio_destroy()