Lines Matching refs:zdev
23 static int zpci_base_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
28 .start_dma = zdev->start_dma,
29 .end_dma = zdev->end_dma,
30 .pchid = zdev->pchid,
31 .vfn = zdev->vfn,
32 .fmb_length = zdev->fmb_length,
33 .pft = zdev->pft,
34 .gid = zdev->pfgid,
35 .fh = zdev->fh
44 static int zpci_group_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
49 .dasm = zdev->dma_mask,
50 .msi_addr = zdev->msi_addr,
52 .mui = zdev->fmb_update,
53 .noi = zdev->max_msi,
55 .version = zdev->version,
57 .imaxstbl = zdev->maxstbl
66 static int zpci_util_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
79 memcpy(cap->util_str, zdev->util_str, cap->size);
91 static int zpci_pfip_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps)
104 memcpy(cap->pfip, zdev->pfip, cap->size);
119 struct zpci_dev *zdev = to_zpci(vdev->pdev);
122 if (!zdev)
125 ret = zpci_base_cap(zdev, caps);
129 ret = zpci_group_cap(zdev, caps);
133 if (zdev->util_str_avail) {
134 ret = zpci_util_cap(zdev, caps);
139 ret = zpci_pfip_cap(zdev, caps);
146 struct zpci_dev *zdev = to_zpci(vdev->pdev);
148 if (!zdev)
155 return zpci_kvm_hook.kvm_register(zdev, vdev->vdev.kvm);
162 struct zpci_dev *zdev = to_zpci(vdev->pdev);
164 if (!zdev || !vdev->vdev.kvm)
168 zpci_kvm_hook.kvm_unregister(zdev);