Displaying 20 results from an estimated 27 matches for "virtio_mmio_queue_ready".
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...virtqueue *vq)
/* Select and deactivate the queue */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
- writel(0, vm_dev->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...
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...virtqueue *vq)
/* Select and deactivate the queue */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
- writel(0, vm_dev->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...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...virtqueue *vq)
/* Select and deactivate the queue */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
- writel(0, vm_dev->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...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...virtqueue *vq)
/* Select and deactivate the queue */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
- writel(0, vm_dev->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...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...virtqueue *vq)
/* Select and deactivate the queue */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
- writel(0, vm_dev->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...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...virtqueue *vq)
/* Select and deactivate the queue */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
- writel(0, vm_dev->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...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...and deactivate the queue */
> writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
> - writel(0, vm_dev->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,...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...and deactivate the queue */
> writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
> - writel(0, vm_dev->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,...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...and deactivate the queue */
> writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
> - writel(0, vm_dev->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,...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...and deactivate the queue */
> writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
> - writel(0, vm_dev->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,...
2015 Apr 28
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...O_MMIO_QUEUE_AVAIL_HIGH);
> +
> + addr = virt_to_phys(virtqueue_get_used(vq));
> + writel((u32)addr, vm_dev->base + VIRTIO_MMIO_QUEUE_USED_LOW);
> + writel((u32)(addr >> 32),
> + vm_dev->base + VIRTIO_MMIO_QUEUE_USED_HIGH);
> +
> + writel(1, vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
> + }
> +
> vq->priv = info;
> info->vq = vq;
This patch moved the call to vring_new_virtqueue() in the legacy code flow
before the VIRTIO_MMIO_QUEUE_NUM, VIRTIO_MMIO_QUEUE_ALIGN, and
VIRTIO_MMIO_QUEUE_PFN writes. Was this intentional? Could the old behavior be
reinstated?...
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...KERNEL);
- if (!info) {
- err = -ENOMEM;
- goto error_kmalloc;
- }
-
num = readl(vm_dev->base + VIRTIO_MMIO_QUEUE_NUM_MAX);
if (num == 0) {
err = -ENOENT;
@@ -420,13 +387,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
writel(1, vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
}
- vq->priv = info;
- info->vq = vq;
-
- spin_lock_irqsave(&vm_dev->lock, flags);
- list_add(&info->node, &vm_dev->virtqueues);
- spin_unlock_irqrestore(&vm_dev->lock, flags);
-
return vq;
error_new_virtqueue:
@@ -436,8 +396,6 @@ static struct virtqueue...
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...KERNEL);
- if (!info) {
- err = -ENOMEM;
- goto error_kmalloc;
- }
-
num = readl(vm_dev->base + VIRTIO_MMIO_QUEUE_NUM_MAX);
if (num == 0) {
err = -ENOENT;
@@ -420,13 +387,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
writel(1, vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
}
- vq->priv = info;
- info->vq = vq;
-
- spin_lock_irqsave(&vm_dev->lock, flags);
- list_add(&info->node, &vm_dev->virtqueues);
- spin_unlock_irqrestore(&vm_dev->lock, flags);
-
return vq;
error_new_virtqueue:
@@ -436,8 +396,6 @@ static struct virtqueue...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
...t; + vm_dev->base + VIRTIO_MMIO_QUEUE_USED_LOW);
> > + writel((addr >> 32) & 0xffffffff,
> > + vm_dev->base + VIRTIO_MMIO_QUEUE_USED_HIGH);
> > +
> > + writel(1, vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
> > + }
> >
> > /* Create the vring */
> > vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
[...]
> > +static struct device_attribute vm_dev_attr_version =
> > + __ATTR(version, S_IRUGO, vm_dev_attr_vers...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
...t; + vm_dev->base + VIRTIO_MMIO_QUEUE_USED_LOW);
> > + writel((addr >> 32) & 0xffffffff,
> > + vm_dev->base + VIRTIO_MMIO_QUEUE_USED_HIGH);
> > +
> > + writel(1, vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
> > + }
> >
> > /* Create the vring */
> > vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
[...]
> > +static struct device_attribute vm_dev_attr_version =
> > + __ATTR(version, S_IRUGO, vm_dev_attr_vers...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...vm_dev->base + VIRTIO_MMIO_QUEUE_USED_LOW);
> > > + writel((addr >> 32) & 0xffffffff,
> > > + vm_dev->base + VIRTIO_MMIO_QUEUE_USED_HIGH);
> > > +
> > > + writel(1, vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
> > > + }
> > >
> > > /* Create the vring */
> > > vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
>
> [...]
>
> > > +static struct device_attribute vm_dev_attr_version =
> > > +...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...vm_dev->base + VIRTIO_MMIO_QUEUE_USED_LOW);
> > > + writel((addr >> 32) & 0xffffffff,
> > > + vm_dev->base + VIRTIO_MMIO_QUEUE_USED_HIGH);
> > > +
> > > + writel(1, vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
> > > + }
> > >
> > > /* Create the vring */
> > > vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
>
> [...]
>
> > > +static struct device_attribute vm_dev_attr_version =
> > > +...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...Ring alignment for the currently selected queue - Write Only */
+#define VIRTIO_MMIO_QUEUE_ALIGN 0x03c
+
+/* Guest's PFN for the currently selected queue - Read Write */
+#define VIRTIO_MMIO_QUEUE_PFN 0x040
+
+#endif
+
+
+/* Ready bit for the currently selected queue - Read Write */
+#define VIRTIO_MMIO_QUEUE_READY 0x044
+
+/* Queue notifier - Write Only */
+#define VIRTIO_MMIO_QUEUE_NOTIFY 0x050
+
+/* Interrupt status - Read Only */
+#define VIRTIO_MMIO_INTERRUPT_STATUS 0x060
+
+/* Interrupt acknowledge - Write Only */
+#define VIRTIO_MMIO_INTERRUPT_ACK 0x064
+
+/* Device status register - Read Write */
+#d...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...Ring alignment for the currently selected queue - Write Only */
+#define VIRTIO_MMIO_QUEUE_ALIGN 0x03c
+
+/* Guest's PFN for the currently selected queue - Read Write */
+#define VIRTIO_MMIO_QUEUE_PFN 0x040
+
+#endif
+
+
+/* Ready bit for the currently selected queue - Read Write */
+#define VIRTIO_MMIO_QUEUE_READY 0x044
+
+/* Queue notifier - Write Only */
+#define VIRTIO_MMIO_QUEUE_NOTIFY 0x050
+
+/* Interrupt status - Read Only */
+#define VIRTIO_MMIO_INTERRUPT_STATUS 0x060
+
+/* Interrupt acknowledge - Write Only */
+#define VIRTIO_MMIO_INTERRUPT_ACK 0x064
+
+/* Device status register - Read Write */
+#d...
2016 Jan 29
18
[PATCH v5 00/10] virtio DMA API, yet again
This switches virtio to use the DMA API on Xen and if requested by
module option.
This fixes virtio on Xen, and it should break anything because it's
off by default on everything except Xen PV on x86.
To the Xen people: is this okay? If it doesn't work on other Xen
variants (PVH? HVM?), can you submit follow-up patches to fix it?
To everyone else: we've waffled on this for way too