search for: virtio_pci_queue_addr_shift

Displaying 20 results from an estimated 84 matches for "virtio_pci_queue_addr_shift".

2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...gt;queue = dma_zalloc_coherent(vdev->dev.parent, size, > + &info->queue_dma_addr, GFP_KERNEL); > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > @@ -462,7 +464,8 @@ out_assign: > vring_del_virtqueue(vq); > out_activate_queue: > iowrite32(0, vp_dev->ioa...
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...gt;queue = dma_zalloc_coherent(vdev->dev.parent, size, > + &info->queue_dma_addr, GFP_KERNEL); > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > @@ -462,7 +464,8 @@ out_assign: > vring_del_virtqueue(vq); > out_activate_queue: > iowrite32(0, vp_dev->ioa...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...ze), > + GFP_KERNEL|__GFP_ZERO); > + info->queue_dma_addr = virt_to_phys(info->queue); > + } > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, > - true, false, info->queue, > +...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...ze), > + GFP_KERNEL|__GFP_ZERO); > + info->queue_dma_addr = virt_to_phys(info->queue); > + } > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, > - true, false, info->queue, > +...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...ze), > + GFP_KERNEL|__GFP_ZERO); > + info->queue_dma_addr = virt_to_phys(info->queue); > + } > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, > - true, false, info->queue, > +...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...ze), > + GFP_KERNEL|__GFP_ZERO); > + info->queue_dma_addr = virt_to_phys(info->queue); > + } > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, > - true, false, info->queue, > +...
2014 Aug 26
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...e(num, VIRTIO_PCI_VRING_ALIGN); + info->queue = dma_zalloc_coherent(vdev->dev.parent, size, + &info->queue_dma_addr, GFP_KERNEL); if (info->queue == NULL) { err = -ENOMEM; goto out_info; } /* activate the queue */ - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); /* create the vring */ @@ -462,7 +464,8 @@ out_assign: vring_del_virtqueue(vq); out_activate_queue: iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); - free_page...
2014 Aug 27
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...&info->queue_dma_addr, GFP_KERNEL); >> if (info->queue == NULL) { >> err = -ENOMEM; >> goto out_info; >> } >> >> /* activate the queue */ >> - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, >> + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, >> vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); >> >> /* create the vring */ >> @@ -462,7 +464,8 @@ out_assign: >> vring_del_virtqueue(vq); >> out_a...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...info->queue = alloc_pages_exact(PAGE_ALIGN(size), + GFP_KERNEL|__GFP_ZERO); + info->queue_dma_addr = virt_to_phys(info->queue); + } if (info->queue == NULL) { err = -ENOMEM; goto out_info; } /* activate the queue */ - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); /* create the vring */ vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, - true, false, info->queue, + true, info->use_dma_api, in...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...= virt_to_phys(info->queue); >> + } >> if (info->queue == NULL) { >> err = -ENOMEM; >> goto out_info; >> } >> >> /* activate the queue */ >> - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, >> + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, >> vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); >> >> /* create the vring */ >> vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, >&...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...> + info->queue_dma_addr = virt_to_phys(info->queue); > > + } > > if (info->queue == NULL) { > > err = -ENOMEM; > > goto out_info; > > } > > > > /* activate the queue */ > > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > > > /* create the vring */ > > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, > > - true,...
2010 Sep 29
1
[RFC PATCH] virtio: (Partially) enable suspend/resume support
..._idx(info->vq), + vp_dev->ioaddr + VIRTIO_PCI_AVAIL_IDX); + + if (info->msix_vector != VIRTIO_MSI_NO_VECTOR) { + iowrite16(info->msix_vector, + vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR); + } + + /* activate the queue */ + iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, + vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); + + } + spin_unlock_irqrestore(&vp_dev->lock, flags); + + vp_set_status(&vp_dev->vdev, VIRTIO_CONFIG_S_DRIVER_OK); + return 0; } #endif diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 1475ed6..3eb91d1...
2010 Sep 29
1
[RFC PATCH] virtio: (Partially) enable suspend/resume support
..._idx(info->vq), + vp_dev->ioaddr + VIRTIO_PCI_AVAIL_IDX); + + if (info->msix_vector != VIRTIO_MSI_NO_VECTOR) { + iowrite16(info->msix_vector, + vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR); + } + + /* activate the queue */ + iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, + vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); + + } + spin_unlock_irqrestore(&vp_dev->lock, flags); + + vp_set_status(&vp_dev->vdev, VIRTIO_CONFIG_S_DRIVER_OK); + return 0; } #endif diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 1475ed6..3eb91d1...
2014 Sep 17
6
[PATCH v5 0/3] virtio: Use the DMA API when appropriate
This fixes virtio on Xen guests as well as on any other platform that uses virtio_pci on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here: https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git Without these patches, the guest hangs forever. With these patches,
2014 Sep 17
6
[PATCH v5 0/3] virtio: Use the DMA API when appropriate
This fixes virtio on Xen guests as well as on any other platform that uses virtio_pci on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here: https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git Without these patches, the guest hangs forever. With these patches,
2015 Dec 07
6
[PATCH RFC 0/3] Xen on Virtio
Hi all, this patch series introduces support for running Linux on top of Xen inside a virtual machine with virtio devices (nested virt scenario). The problem is that Linux virtio drivers use virt_to_phys to get the guest pseudo-physical addresses to pass to the backend, which doesn't work as expected on Xen. Switching the virtio drivers to the dma APIs (dma_alloc_coherent,
2015 Dec 07
6
[PATCH RFC 0/3] Xen on Virtio
Hi all, this patch series introduces support for running Linux on top of Xen inside a virtual machine with virtio devices (nested virt scenario). The problem is that Linux virtio drivers use virt_to_phys to get the guest pseudo-physical addresses to pass to the backend, which doesn't work as expected on Xen. Switching the virtio drivers to the dma APIs (dma_alloc_coherent,
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...RTIO_PCI_VRING_ALIGN)); info->queue = alloc_pages_exact(size, GFP_KERNEL|__GFP_ZERO); - if (info->queue == NULL) { - err = -ENOMEM; - goto out_info; - } + if (info->queue == NULL) + return ERR_PTR(-ENOMEM); /* activate the queue */ iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); /* create the vring */ - vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, + vq = vring_new_virtqueue(index, info->num, + VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev, true, info->queue, vp_notify, callba...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...RTIO_PCI_VRING_ALIGN)); info->queue = alloc_pages_exact(size, GFP_KERNEL|__GFP_ZERO); - if (info->queue == NULL) { - err = -ENOMEM; - goto out_info; - } + if (info->queue == NULL) + return ERR_PTR(-ENOMEM); /* activate the queue */ iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); /* create the vring */ - vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, + vq = vring_new_virtqueue(index, info->num, + VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev, true, info->queue, vp_notify, callba...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...gt; > > + } > > > if (info->queue == NULL) { > > > err = -ENOMEM; > > > goto out_info; > > > } > > > > > > /* activate the queue */ > > > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > > > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > > > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > > > > > /* create the vring */ > > > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VR...