Displaying 20 results from an estimated 68 matches for "out_info".
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...oc_pages_exact(size, GFP_KERNEL|__GFP_ZERO);
> + size = vring_size(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...
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...oc_pages_exact(size, GFP_KERNEL|__GFP_ZERO);
> + size = vring_size(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...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...P_KERNEL);
- if (!info)
- return ERR_PTR(-ENOMEM);
-
info->num = num;
info->msix_vector = msix_vec;
size = PAGE_ALIGN(vring_size(num, VIRTIO_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, VIRTI...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...P_KERNEL);
- if (!info)
- return ERR_PTR(-ENOMEM);
-
info->num = num;
info->msix_vector = msix_vec;
size = PAGE_ALIGN(vring_size(num, VIRTIO_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, VIRTI...
2007 Nov 10
1
[PATCH] virtio_pci updates
...e the memory needed for the queue and provide the memory
- * location to the host */
- info->n_pages = DIV_ROUND_UP(vring_size(num), PAGE_SIZE);
- info->pages = alloc_pages(GFP_KERNEL | __GFP_ZERO,
- get_order(info->n_pages));
- if (info->pages == NULL) {
- err = -ENOMEM;
- goto out_info;
- }
-
- /* FIXME: is this sufficient for info->n_pages > 1? */
- info->queue = kmap(info->pages);
+ info->queue = kmalloc(vring_size(num), GFP_KERNEL | __GFP_ZERO);
if (info->queue == NULL) {
err = -ENOMEM;
- goto out_alloc_pages;
+ goto out_info;
}
/* activate the q...
2007 Nov 10
1
[PATCH] virtio_pci updates
...e the memory needed for the queue and provide the memory
- * location to the host */
- info->n_pages = DIV_ROUND_UP(vring_size(num), PAGE_SIZE);
- info->pages = alloc_pages(GFP_KERNEL | __GFP_ZERO,
- get_order(info->n_pages));
- if (info->pages == NULL) {
- err = -ENOMEM;
- goto out_info;
- }
-
- /* FIXME: is this sufficient for info->n_pages > 1? */
- info->queue = kmap(info->pages);
+ info->queue = kmalloc(vring_size(num), GFP_KERNEL | __GFP_ZERO);
if (info->queue == NULL) {
err = -ENOMEM;
- goto out_alloc_pages;
+ goto out_info;
}
/* activate the q...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...eue_dma_addr,
> + GFP_KERNEL);
> + } else {
> + 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...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...eue_dma_addr,
> + GFP_KERNEL);
> + } else {
> + 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...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...eue_dma_addr,
> + GFP_KERNEL);
> + } else {
> + 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...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...eue_dma_addr,
> + GFP_KERNEL);
> + } else {
> + 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...
2014 Aug 26
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...LIGN));
- info->queue = alloc_pages_exact(size, GFP_KERNEL|__GFP_ZERO);
+ size = vring_size(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:
vri...
2014 Aug 27
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...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_P...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...t;dev.parent, size,
+ &info->queue_dma_addr,
+ GFP_KERNEL);
+ } else {
+ 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, inf...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
..._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_P...
2014 Sep 17
0
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...> > + } else {
> > + 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);
>...
2017 Feb 07
2
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?02?06? 01:15, Christoph Hellwig wrote:
> We don't really need struct virtio_pci_vq_info, as most field in there
> are redundant:
>
> - the vq backpointer is not strictly neede to start with
> - the entry in the vqs list is not needed - the generic virtqueue already
> has list, we only need to check if it has a callback to get the same
> semantics
>
2017 Feb 07
2
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?02?06? 01:15, Christoph Hellwig wrote:
> We don't really need struct virtio_pci_vq_info, as most field in there
> are redundant:
>
> - the vq backpointer is not strictly neede to start with
> - the entry in the vqs list is not needed - the generic virtqueue already
> has list, we only need to check if it has a callback to get the same
> semantics
>
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,
2017 Jan 27
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
...*info = kmalloc(sizeof *info, GFP_KERNEL);
- struct virtqueue *vq;
- unsigned long flags;
-
- /* fill out our structure that represents an active queue */
- if (!info)
- return ERR_PTR(-ENOMEM);
-
- vq = vp_dev->setup_vq(vp_dev, info, index, callback, name, msix_vec);
- if (IS_ERR(vq))
- goto out_info;
-
- info->vq = vq;
- if (callback) {
- spin_lock_irqsave(&vp_dev->lock, flags);
- list_add(&info->node, &vp_dev->virtqueues);
- spin_unlock_irqrestore(&vp_dev->lock, flags);
- } else {
- INIT_LIST_HEAD(&info->node);
- }
-
- vp_dev->vqs[index] = info;
-...