Lines Matching refs:nib
339 * vfio_ap_validate_nib - validate a notification indicator byte (nib) address.
342 * @nib: the location for storing the nib address.
345 * address of the notification indicator byte (nib) used for IRQ notification.
346 * This function parses and validates the nib from gr2.
348 * Return: returns zero if the nib address is a valid; otherwise, returns
351 static int vfio_ap_validate_nib(struct kvm_vcpu *vcpu, dma_addr_t *nib)
353 *nib = vcpu->run->s.regs.gprs[2];
355 if (!*nib)
357 if (kvm_is_error_hva(gfn_to_hva(vcpu->kvm, *nib >> PAGE_SHIFT)))
368 * The nib has to be located in shared storage since guest and
416 dma_addr_t nib;
420 if (vfio_ap_validate_nib(vcpu, &nib)) {
421 VFIO_AP_DBF_WARN("%s: invalid NIB address: nib=%pad, apqn=%#04x\n",
422 __func__, &nib, q->apqn);
428 ret = vfio_pin_pages(&q->matrix_mdev->vdev, nib, 1,
435 "nib=%pad, apqn=%#04x\n",
436 __func__, ret, &nib, q->apqn);
445 h_nib = page_to_phys(h_page) | (nib & ~PAGE_MASK);
451 vfio_unpin_pages(&q->matrix_mdev->vdev, nib, 1);
461 vfio_unpin_pages(&q->matrix_mdev->vdev, nib, 1);
475 q->saved_iova = nib;
480 vfio_unpin_pages(&q->matrix_mdev->vdev, nib, 1);