search for: virtio_mmio_vring_align

Displaying 20 results from an estimated 56 matches for "virtio_mmio_vring_align".

2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...base + VIRTIO_MMIO_QUEUE_PFN); + if (vm_dev->version == 1) { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); + } else { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); + } size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); free_pages_exact(info->queue, size); @@ -312,7 +294,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); /* Queue shouldn't already be set up. */ - if (readl(vm_dev->base + VIRTIO_MMIO_QUEU...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...base + VIRTIO_MMIO_QUEUE_PFN); + if (vm_dev->version == 1) { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); + } else { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); + } size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); free_pages_exact(info->queue, size); @@ -312,7 +294,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); /* Queue shouldn't already be set up. */ - if (readl(vm_dev->base + VIRTIO_MMIO_QUEU...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
...isn't really needed, is it? I admit I'm never sure what are the narrowing side effects. You are probably right that u64 >> 32 will be always 32 bit. > > + > > + addr += sizeof(struct vring_avail) + info->num * sizeof(__u16); > > + addr += VIRTIO_MMIO_VRING_ALIGN - 1; > > + addr &= ~(VIRTIO_MMIO_VRING_ALIGN - 1); > > > Host no longer knows the alignment, so why is it needed? [skipped the spec reference, it's a separate discussion] > I think you shouldn't use VIRTIO_MMIO_VRING_ALIGN in non-legacy code: > it...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
...isn't really needed, is it? I admit I'm never sure what are the narrowing side effects. You are probably right that u64 >> 32 will be always 32 bit. > > + > > + addr += sizeof(struct vring_avail) + info->num * sizeof(__u16); > > + addr += VIRTIO_MMIO_VRING_ALIGN - 1; > > + addr &= ~(VIRTIO_MMIO_VRING_ALIGN - 1); > > > Host no longer knows the alignment, so why is it needed? [skipped the spec reference, it's a separate discussion] > I think you shouldn't use VIRTIO_MMIO_VRING_ALIGN in non-legacy code: > it...
2012 Sep 24
3
[PATCH 0/2] virtio-mmio updates for 3.7
Hi Rusty, Would you be so kind and consider getting those two small fixes into 3.7 merge? All credits go to Brian, all shame on me :-) Cheers! Pawel Brian Foley (2): virtio_mmio: fix off by one error allocating queue virtio_mmio: Don't attempt to create empty virtqueues drivers/virtio/virtio_mmio.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) -- 1.7.9.5
2012 Sep 24
3
[PATCH 0/2] virtio-mmio updates for 3.7
Hi Rusty, Would you be so kind and consider getting those two small fixes into 3.7 merge? All credits go to Brian, all shame on me :-) Cheers! Pawel Brian Foley (2): virtio_mmio: fix off by one error allocating queue virtio_mmio: Don't attempt to create empty virtqueues drivers/virtio/virtio_mmio.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) -- 1.7.9.5
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...(vm_dev->version == 1) { > + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); > + } else { > + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); > + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); > + } > > size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); > free_pages_exact(info->queue, size); > @@ -312,7 +294,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, > writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); > > /* Queue shouldn't already be set up. */ > - if (readl(vm_d...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...(vm_dev->version == 1) { > + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); > + } else { > + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); > + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); > + } > > size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); > free_pages_exact(info->queue, size); > @@ -312,7 +294,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, > writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); > > /* Queue shouldn't already be set up. */ > - if (readl(vm_d...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...; > I admit I'm never sure what are the narrowing side effects. You are > probably right that u64 >> 32 will be always 32 bit. > > > > + > > > + addr += sizeof(struct vring_avail) + info->num * sizeof(__u16); > > > + addr += VIRTIO_MMIO_VRING_ALIGN - 1; > > > + addr &= ~(VIRTIO_MMIO_VRING_ALIGN - 1); > > > > > > Host no longer knows the alignment, so why is it needed? > > [skipped the spec reference, it's a separate discussion] > > > I think you shouldn't use VIRTIO_MMIO_VR...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...; > I admit I'm never sure what are the narrowing side effects. You are > probably right that u64 >> 32 will be always 32 bit. > > > > + > > > + addr += sizeof(struct vring_avail) + info->num * sizeof(__u16); > > > + addr += VIRTIO_MMIO_VRING_ALIGN - 1; > > > + addr &= ~(VIRTIO_MMIO_VRING_ALIGN - 1); > > > > > > Host no longer knows the alignment, so why is it needed? > > [skipped the spec reference, it's a separate discussion] > > > I think you shouldn't use VIRTIO_MMIO_VR...
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...base + VIRTIO_MMIO_QUEUE_PFN); + if (vm_dev->version == 1) { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); + } else { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); + } size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); free_pages_exact(info->queue, size); @@ -312,7 +301,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); /* Queue shouldn't already be set up. */ - if (readl(vm_dev->base + VIRTIO_MMIO_QUEU...
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...base + VIRTIO_MMIO_QUEUE_PFN); + if (vm_dev->version == 1) { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); + } else { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); + } size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); free_pages_exact(info->queue, size); @@ -312,7 +301,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); /* Queue shouldn't already be set up. */ - if (readl(vm_dev->base + VIRTIO_MMIO_QUEU...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
On Thu, 2015-01-15 at 17:51 +0000, Michael S. Tsirkin wrote: > > > I think you shouldn't use VIRTIO_MMIO_VRING_ALIGN in non-legacy code: > > > it's a legacy thing. > > > > But I still need to pass something to vring_new_virtqueue() below, don't > > I? And it will allocate the queue based on some alignment value. I can't > > see anything that would create the layout fo...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
On Thu, 2015-01-15 at 17:51 +0000, Michael S. Tsirkin wrote: > > > I think you shouldn't use VIRTIO_MMIO_VRING_ALIGN in non-legacy code: > > > it's a legacy thing. > > > > But I still need to pass something to vring_new_virtqueue() below, don't > > I? And it will allocate the queue based on some alignment value. I can't > > see anything that would create the layout fo...
2015 Apr 28
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...2015 01:12 PM, Pawel Moll wrote: > @@ -356,13 +346,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, > info->num /= 2; > } > > - /* Activate the queue */ > - writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM); > - writel(VIRTIO_MMIO_VRING_ALIGN, > - vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN); > - writel(virt_to_phys(info->queue) >> PAGE_SHIFT, > - vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); > - > /* Create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev, >...
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...base + VIRTIO_MMIO_QUEUE_PFN); + if (vm_dev->version == 1) { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); + } else { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); + } size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); free_pages_exact(info->queue, size); @@ -312,7 +294,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); /* Queue shouldn't already be set up. */ - if (readl(vm_dev->base + VIRTIO_MMIO_QUEU...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...base + VIRTIO_MMIO_QUEUE_PFN); + if (vm_dev->version == 1) { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); + } else { + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); + } size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); free_pages_exact(info->queue, size); @@ -312,7 +294,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); /* Queue shouldn't already be set up. */ - if (readl(vm_dev->base + VIRTIO_MMIO_QUEU...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...(vm_dev->version == 1) { > + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); > + } else { > + writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); > + WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); > + } > > size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); > free_pages_exact(info->queue, size); > @@ -312,7 +301,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, > writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL); > > /* Queue shouldn't already be set up. */ > - if (readl(vm_d...