Lines Matching refs:vdpa
14 #include <linux/vdpa.h>
39 struct vdpa_device vdpa;
49 static struct eni_vdpa *vdpa_to_eni(struct vdpa_device *vdpa)
51 return container_of(vdpa, struct eni_vdpa, vdpa);
54 static struct virtio_pci_legacy_device *vdpa_to_ldev(struct vdpa_device *vdpa)
56 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
61 static u64 eni_vdpa_get_device_features(struct vdpa_device *vdpa)
63 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
72 static int eni_vdpa_set_driver_features(struct vdpa_device *vdpa, u64 features)
74 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
87 static u64 eni_vdpa_get_driver_features(struct vdpa_device *vdpa)
89 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
94 static u8 eni_vdpa_get_status(struct vdpa_device *vdpa)
96 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
101 static int eni_vdpa_get_vq_irq(struct vdpa_device *vdpa, u16 idx)
103 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
179 "eni-vdpa[%s]-%d\n", pci_name(pdev), i);
193 snprintf(eni_vdpa->msix_name, ENI_MSIX_NAME_SIZE, "eni-vdpa[%s]-config\n",
211 static void eni_vdpa_set_status(struct vdpa_device *vdpa, u8 status)
213 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
215 u8 s = eni_vdpa_get_status(vdpa);
229 static int eni_vdpa_reset(struct vdpa_device *vdpa)
231 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
233 u8 s = eni_vdpa_get_status(vdpa);
243 static u16 eni_vdpa_get_vq_num_max(struct vdpa_device *vdpa)
245 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
250 static u16 eni_vdpa_get_vq_num_min(struct vdpa_device *vdpa)
252 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
257 static int eni_vdpa_get_vq_state(struct vdpa_device *vdpa, u16 qid,
263 static int eni_vdpa_set_vq_state(struct vdpa_device *vdpa, u16 qid,
266 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
281 static void eni_vdpa_set_vq_cb(struct vdpa_device *vdpa, u16 qid,
284 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
289 static void eni_vdpa_set_vq_ready(struct vdpa_device *vdpa, u16 qid,
292 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
302 static bool eni_vdpa_get_vq_ready(struct vdpa_device *vdpa, u16 qid)
304 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
309 static void eni_vdpa_set_vq_num(struct vdpa_device *vdpa, u16 qid,
312 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
326 static int eni_vdpa_set_vq_address(struct vdpa_device *vdpa, u16 qid,
330 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
338 static void eni_vdpa_kick_vq(struct vdpa_device *vdpa, u16 qid)
340 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
345 static u32 eni_vdpa_get_device_id(struct vdpa_device *vdpa)
347 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
352 static u32 eni_vdpa_get_vendor_id(struct vdpa_device *vdpa)
354 struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa);
359 static u32 eni_vdpa_get_vq_align(struct vdpa_device *vdpa)
364 static size_t eni_vdpa_get_config_size(struct vdpa_device *vdpa)
370 static void eni_vdpa_get_config(struct vdpa_device *vdpa,
374 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
386 static void eni_vdpa_set_config(struct vdpa_device *vdpa,
390 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
402 static void eni_vdpa_set_config_cb(struct vdpa_device *vdpa,
405 struct eni_vdpa *eni_vdpa = vdpa_to_eni(vdpa);
447 eni_vdpa_get_config(&eni_vdpa->vdpa,
472 eni_vdpa = vdpa_alloc_device(struct eni_vdpa, vdpa,
491 eni_vdpa->vdpa.dma_dev = &pdev->dev;
509 ret = vdpa_register_device(&eni_vdpa->vdpa, eni_vdpa->queues);
511 ENI_ERR(pdev, "failed to register to vdpa bus\n");
520 put_device(&eni_vdpa->vdpa.dev);
528 vdpa_unregister_device(&eni_vdpa->vdpa);
541 .name = "alibaba-eni-vdpa",