Lines Matching refs:vqpci

125     QVirtQueuePCI *vqpci = (QVirtQueuePCI *)vq;  in qvirtio_pci_get_queue_isr_status()  local
129 g_assert_cmpint(vqpci->msix_entry, !=, -1); in qvirtio_pci_get_queue_isr_status()
130 if (qpci_msix_masked(dev->pdev, vqpci->msix_entry)) { in qvirtio_pci_get_queue_isr_status()
132 return qpci_msix_pending(dev->pdev, vqpci->msix_entry); in qvirtio_pci_get_queue_isr_status()
134 data = qtest_readl(dev->pdev->bus->qts, vqpci->msix_addr); in qvirtio_pci_get_queue_isr_status()
135 if (data == vqpci->msix_data) { in qvirtio_pci_get_queue_isr_status()
136 qtest_writel(dev->pdev->bus->qts, vqpci->msix_addr, 0); in qvirtio_pci_get_queue_isr_status()
209 QVirtQueuePCI *vqpci; in qvirtio_pci_virtqueue_setup_common() local
212 vqpci = g_malloc0(sizeof(*vqpci)); in qvirtio_pci_virtqueue_setup_common()
216 vqpci->vq.vdev = d; in qvirtio_pci_virtqueue_setup_common()
217 vqpci->vq.index = index; in qvirtio_pci_virtqueue_setup_common()
218 vqpci->vq.size = d->bus->get_queue_size(d); in qvirtio_pci_virtqueue_setup_common()
219 vqpci->vq.free_head = 0; in qvirtio_pci_virtqueue_setup_common()
220 vqpci->vq.num_free = vqpci->vq.size; in qvirtio_pci_virtqueue_setup_common()
221 vqpci->vq.align = VIRTIO_PCI_VRING_ALIGN; in qvirtio_pci_virtqueue_setup_common()
222 vqpci->vq.indirect = feat & (1ull << VIRTIO_RING_F_INDIRECT_DESC); in qvirtio_pci_virtqueue_setup_common()
223 vqpci->vq.event = feat & (1ull << VIRTIO_RING_F_EVENT_IDX); in qvirtio_pci_virtqueue_setup_common()
225 vqpci->msix_entry = -1; in qvirtio_pci_virtqueue_setup_common()
226 vqpci->msix_addr = 0; in qvirtio_pci_virtqueue_setup_common()
227 vqpci->msix_data = 0x12345678; in qvirtio_pci_virtqueue_setup_common()
230 g_assert_cmpint(vqpci->vq.size, !=, 0); in qvirtio_pci_virtqueue_setup_common()
233 g_assert_cmpint(vqpci->vq.size & (vqpci->vq.size - 1), ==, 0); in qvirtio_pci_virtqueue_setup_common()
235 addr = guest_alloc(alloc, qvring_size(vqpci->vq.size, in qvirtio_pci_virtqueue_setup_common()
237 qvring_init(qvpcidev->pdev->bus->qts, alloc, &vqpci->vq, addr); in qvirtio_pci_virtqueue_setup_common()
238 d->bus->set_queue_address(d, &vqpci->vq); in qvirtio_pci_virtqueue_setup_common()
240 return &vqpci->vq; in qvirtio_pci_virtqueue_setup_common()
246 QVirtQueuePCI *vqpci = container_of(vq, QVirtQueuePCI, vq); in qvirtio_pci_virtqueue_cleanup_common() local
249 g_free(vqpci); in qvirtio_pci_virtqueue_cleanup_common()
314 void qvirtqueue_pci_msix_setup(QVirtioPCIDevice *d, QVirtQueuePCI *vqpci, in qvirtqueue_pci_msix_setup() argument
325 vqpci->msix_entry = entry; in qvirtqueue_pci_msix_setup()
327 vqpci->msix_addr = guest_alloc(alloc, 4); in qvirtqueue_pci_msix_setup()
329 off + PCI_MSIX_ENTRY_LOWER_ADDR, vqpci->msix_addr & ~0UL); in qvirtqueue_pci_msix_setup()
332 (vqpci->msix_addr >> 32) & ~0UL); in qvirtqueue_pci_msix_setup()
334 off + PCI_MSIX_ENTRY_DATA, vqpci->msix_data); in qvirtqueue_pci_msix_setup()
342 d->msix_ops->set_queue_vector(d, vqpci->vq.index, entry); in qvirtqueue_pci_msix_setup()