Displaying 20 results from an estimated 36 matches for "virtio_mmio_queue_sel".
2013 May 02
2
BUG: virtio_mmio multi-queue competely broken -- virtio *registers* considered harmful
Virtiio_mmio attempts to mimic the layout of some control registers from
virtio_pci. These registers, in particular VIRTIO_MMIO_QUEUE_SEL and
VIRTIO_PCI_QUEUE_SEL,
are active in nature, and not just passive like a normal memory
location. Thus, the host side must react immediately upon write of
these registers to map some other registers (queue address, size, etc)
to queue-specific locations. This is just not possible for mmio,...
2013 May 02
2
BUG: virtio_mmio multi-queue competely broken -- virtio *registers* considered harmful
Virtiio_mmio attempts to mimic the layout of some control registers from
virtio_pci. These registers, in particular VIRTIO_MMIO_QUEUE_SEL and
VIRTIO_PCI_QUEUE_SEL,
are active in nature, and not just passive like a normal memory
location. Thus, the host side must react immediately upon write of
these registers to map some other registers (queue address, size, etc)
to queue-specific locations. This is just not possible for mmio,...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...set selector - Write Only */
+#define VIRTIO_MMIO_DRIVER_FEATURES_SEL 0x024
+
+
+#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */
+
+/* Guest's memory page size in bytes - Write Only */
+#define VIRTIO_MMIO_GUEST_PAGE_SIZE 0x028
+
+#endif
+
+
+/* Queue selector - Write Only */
+#define VIRTIO_MMIO_QUEUE_SEL 0x030
+
+/* Maximum size of the currently selected queue - Read Only */
+#define VIRTIO_MMIO_QUEUE_NUM_MAX 0x034
+
+/* Queue size for the currently selected queue - Write Only */
+#define VIRTIO_MMIO_QUEUE_NUM 0x038
+
+
+#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */
+
+/* Used Ring ali...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...set selector - Write Only */
+#define VIRTIO_MMIO_DRIVER_FEATURES_SEL 0x024
+
+
+#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */
+
+/* Guest's memory page size in bytes - Write Only */
+#define VIRTIO_MMIO_GUEST_PAGE_SIZE 0x028
+
+#endif
+
+
+/* Queue selector - Write Only */
+#define VIRTIO_MMIO_QUEUE_SEL 0x030
+
+/* Maximum size of the currently selected queue - Read Only */
+#define VIRTIO_MMIO_QUEUE_NUM_MAX 0x034
+
+/* Queue size for the currently selected queue - Write Only */
+#define VIRTIO_MMIO_QUEUE_NUM 0x038
+
+
+#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */
+
+/* Used Ring ali...
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...l(0, vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES_SEL);
+ writel((u32)vdev->features,
+ vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
return 0;
}
@@ -275,7 +259,12 @@ static void vm_del_vq(struct 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...
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...l(0, vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES_SEL);
+ writel((u32)vdev->features,
+ vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
return 0;
}
@@ -275,7 +259,12 @@ static void vm_del_vq(struct 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...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...l(0, vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES_SEL);
+ writel((u32)vdev->features,
+ vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
return 0;
}
@@ -275,7 +252,12 @@ static void vm_del_vq(struct 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...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...l(0, vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES_SEL);
+ writel((u32)vdev->features,
+ vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
return 0;
}
@@ -275,7 +252,12 @@ static void vm_del_vq(struct 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...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...TURES_SEL);
> + writel((u32)vdev->features,
> + vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
>
> return 0;
> }
> @@ -275,7 +259,12 @@ static void vm_del_vq(struct 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_READ...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...TURES_SEL);
> + writel((u32)vdev->features,
> + vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
>
> return 0;
> }
> @@ -275,7 +259,12 @@ static void vm_del_vq(struct 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_READ...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...>base + VIRTIO_MMIO_DRIVER_FEATURES_SEL);
+ writel(vdev->features & 0xffffffff,
+ vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
return 0;
}
@@ -275,7 +252,12 @@ static void vm_del_vq(struct 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...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...>base + VIRTIO_MMIO_DRIVER_FEATURES_SEL);
+ writel(vdev->features & 0xffffffff,
+ vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
return 0;
}
@@ -275,7 +252,12 @@ static void vm_del_vq(struct 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...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...> + writel(vdev->features & 0xffffffff,
> + vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
>
> return 0;
> }
> @@ -275,7 +252,12 @@ static void vm_del_vq(struct 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_READ...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...> + writel(vdev->features & 0xffffffff,
> + vm_dev->base + VIRTIO_MMIO_DRIVER_FEATURES);
>
> return 0;
> }
> @@ -275,7 +252,12 @@ static void vm_del_vq(struct 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_READ...
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?
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...nfo *info = vq->priv;
- unsigned long flags;
unsigned int index = vq->index;
- spin_lock_irqsave(&vm_dev->lock, flags);
- list_del(&info->node);
- spin_unlock_irqrestore(&vm_dev->lock, flags);
-
/* Select and deactivate the queue */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
if (vm_dev->version == 1) {
@@ -333,8 +311,6 @@ static void vm_del_vq(struct virtqueue *vq)
}
vring_del_virtqueue(vq);
-
- kfree(info);
}
static void vm_del_vqs(struct virtio_device *vdev)
@@ -353,9 +329,7 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned...
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...nfo *info = vq->priv;
- unsigned long flags;
unsigned int index = vq->index;
- spin_lock_irqsave(&vm_dev->lock, flags);
- list_del(&info->node);
- spin_unlock_irqrestore(&vm_dev->lock, flags);
-
/* Select and deactivate the queue */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
if (vm_dev->version == 1) {
@@ -333,8 +311,6 @@ static void vm_del_vq(struct virtqueue *vq)
}
vring_del_virtqueue(vq);
-
- kfree(info);
}
static void vm_del_vqs(struct virtio_device *vdev)
@@ -353,9 +329,7 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned...
2012 Sep 05
1
[PATCH] virtio: support reserved vqs
..._mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -309,6 +309,9 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
unsigned long flags, size;
int err;
+ if (!name)
+ return NULL;
+
/* Select the queue we're interested in */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 2e03d41..92809ba 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -542,7 +542,10 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs,
vp_dev->per_vq_vectors = pe...
2012 Sep 05
1
[PATCH] virtio: support reserved vqs
..._mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -309,6 +309,9 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
unsigned long flags, size;
int err;
+ if (!name)
+ return NULL;
+
/* Select the queue we're interested in */
writel(index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 2e03d41..92809ba 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -542,7 +542,10 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs,
vp_dev->per_vq_vectors = pe...