• Home
  • Raw
  • Download

Lines Matching refs:kvm

55 static inline void get_update_locks_for_kvm(struct kvm *kvm)  in get_update_locks_for_kvm()  argument
58 if (kvm) in get_update_locks_for_kvm()
59 mutex_lock(&kvm->lock); in get_update_locks_for_kvm()
76 static inline void release_update_locks_for_kvm(struct kvm *kvm) in release_update_locks_for_kvm() argument
79 if (kvm) in release_update_locks_for_kvm()
80 mutex_unlock(&kvm->lock); in release_update_locks_for_kvm()
103 if (matrix_mdev && matrix_mdev->kvm) in get_update_locks_for_mdev()
104 mutex_lock(&matrix_mdev->kvm->lock); in get_update_locks_for_mdev()
126 if (matrix_mdev && matrix_mdev->kvm) in release_update_locks_for_mdev()
127 mutex_unlock(&matrix_mdev->kvm->lock); in release_update_locks_for_mdev()
159 if (matrix_mdev->kvm) in get_update_locks_by_apqn()
160 mutex_lock(&matrix_mdev->kvm->lock); in get_update_locks_by_apqn()
192 if (q->matrix_mdev && q->matrix_mdev->kvm) in get_update_locks_for_queue()
193 mutex_lock(&q->matrix_mdev->kvm->lock); in get_update_locks_for_queue()
274 !WARN_ON(!(q->matrix_mdev && q->matrix_mdev->kvm))) { in vfio_ap_free_aqic_resources()
275 kvm_s390_gisc_unregister(q->matrix_mdev->kvm, q->saved_isc); in vfio_ap_free_aqic_resources()
357 if (kvm_is_error_hva(gfn_to_hva(vcpu->kvm, *nib >> PAGE_SHIFT))) in vfio_ap_validate_nib()
414 struct kvm *kvm; in vfio_ap_irq_enable() local
442 kvm = q->matrix_mdev->kvm; in vfio_ap_irq_enable()
443 gisa = kvm->arch.gisa_int.origin; in vfio_ap_irq_enable()
450 ensure_nib_shared(h_nib & PAGE_MASK, kvm->arch.gmap)) { in vfio_ap_irq_enable()
456 nisc = kvm_s390_gisc_register(kvm, isc); in vfio_ap_irq_enable()
481 kvm_s390_gisc_unregister(kvm, isc); in vfio_ap_irq_enable()
588 if (!vcpu->kvm->arch.crypto.pqap_hook) { in handle_pqap()
595 matrix_mdev = container_of(vcpu->kvm->arch.crypto.pqap_hook, in handle_pqap()
599 if (!matrix_mdev->kvm) { in handle_pqap()
640 if (matrix_mdev->kvm) in vfio_ap_mdev_update_guest_apcb()
641 kvm_arch_crypto_set_masks(matrix_mdev->kvm, in vfio_ap_mdev_update_guest_apcb()
1590 struct kvm *kvm) in vfio_ap_mdev_set_kvm() argument
1594 if (kvm->arch.crypto.crycbd) { in vfio_ap_mdev_set_kvm()
1595 down_write(&kvm->arch.crypto.pqap_hook_rwsem); in vfio_ap_mdev_set_kvm()
1596 kvm->arch.crypto.pqap_hook = &matrix_mdev->pqap_hook; in vfio_ap_mdev_set_kvm()
1597 up_write(&kvm->arch.crypto.pqap_hook_rwsem); in vfio_ap_mdev_set_kvm()
1599 get_update_locks_for_kvm(kvm); in vfio_ap_mdev_set_kvm()
1602 if (m != matrix_mdev && m->kvm == kvm) { in vfio_ap_mdev_set_kvm()
1603 release_update_locks_for_kvm(kvm); in vfio_ap_mdev_set_kvm()
1608 kvm_get_kvm(kvm); in vfio_ap_mdev_set_kvm()
1609 matrix_mdev->kvm = kvm; in vfio_ap_mdev_set_kvm()
1612 release_update_locks_for_kvm(kvm); in vfio_ap_mdev_set_kvm()
1651 struct kvm *kvm = matrix_mdev->kvm; in vfio_ap_mdev_unset_kvm() local
1653 if (kvm && kvm->arch.crypto.crycbd) { in vfio_ap_mdev_unset_kvm()
1654 down_write(&kvm->arch.crypto.pqap_hook_rwsem); in vfio_ap_mdev_unset_kvm()
1655 kvm->arch.crypto.pqap_hook = NULL; in vfio_ap_mdev_unset_kvm()
1656 up_write(&kvm->arch.crypto.pqap_hook_rwsem); in vfio_ap_mdev_unset_kvm()
1658 get_update_locks_for_kvm(kvm); in vfio_ap_mdev_unset_kvm()
1660 kvm_arch_crypto_clear_masks(kvm); in vfio_ap_mdev_unset_kvm()
1662 kvm_put_kvm(kvm); in vfio_ap_mdev_unset_kvm()
1663 matrix_mdev->kvm = NULL; in vfio_ap_mdev_unset_kvm()
1665 release_update_locks_for_kvm(kvm); in vfio_ap_mdev_unset_kvm()
1838 if (!vdev->kvm) in vfio_ap_mdev_open_device()
1841 return vfio_ap_mdev_set_kvm(matrix_mdev, vdev->kvm); in vfio_ap_mdev_open_device()
2067 if (matrix_mdev->kvm && in status_show()
2344 mutex_lock(&matrix_mdev->kvm->lock); in vfio_ap_mdev_cfg_remove()
2362 mutex_unlock(&matrix_mdev->kvm->lock); in vfio_ap_mdev_cfg_remove()
2559 mutex_lock(&matrix_mdev->kvm->lock); in vfio_ap_mdev_hot_plug_cfg()
2581 mutex_unlock(&matrix_mdev->kvm->lock); in vfio_ap_mdev_hot_plug_cfg()