Displaying 20 results from an estimated 82 matches for "virtio_pci_queue_notify".
2015 Mar 11
4
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...et_handler)
> > {
> > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> > }
> > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> > - true, n, notifier);
> > + true, cpu_to_host_notifier16(vdev, n),
> > + notifier);
> > } else {
> > memory_region_del_eventfd(&proxy->bar, V...
2015 Mar 11
4
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...et_handler)
> > {
> > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> > }
> > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> > - true, n, notifier);
> > + true, cpu_to_host_notifier16(vdev, n),
> > + notifier);
> > } else {
> > memory_region_del_eventfd(&proxy->bar, V...
2015 Mar 11
1
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...; {
> > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> > > }
> > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> > > - true, n, notifier);
> > > + true, cpu_to_host_notifier16(vdev, n),
> > > + notifier);
> > > } else {
> > > memory_region_del_even...
2015 Mar 11
1
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...; {
> > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> > > }
> > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> > > - true, n, notifier);
> > > + true, cpu_to_host_notifier16(vdev, n),
> > > + notifier);
> > > } else {
> > > memory_region_del_even...
2015 Mar 11
2
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...int n, bool assign, bool set_handler)
{
@@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
}
virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
- true, n, notifier);
+ true, cpu_to_host_notifier16(vdev, n),
+ notifier);
} else {
memory_region_del_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
-...
2015 Mar 11
2
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...int n, bool assign, bool set_handler)
{
@@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
}
virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
- true, n, notifier);
+ true, cpu_to_host_notifier16(vdev, n),
+ notifier);
} else {
memory_region_del_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
-...
2014 Dec 08
0
[PATCH v2 04/10] virtio_pci: use priv for vq notification
...on used when creating a virt queue */
static bool vp_notify(struct virtqueue *vq)
{
- struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev);
-
/* we write the queue's selector into the notification register to
* signal the other end */
- iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY);
+ iowrite16(vq->index, (void __iomem *)vq->priv);
return true;
}
@@ -437,6 +435,7 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
goto out_activate_queue;
}
+ vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
info->v...
2015 Mar 11
0
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...> @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> > > > }
> > > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> > > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> > > > - true, n, notifier);
> > > > + true, cpu_to_host_notifier16(vdev, n),
> > > > + notifier);
> > > > } else {
> > > >...
2014 Dec 08
0
[PATCH v2 04/10] virtio_pci: use priv for vq notification
...on used when creating a virt queue */
static bool vp_notify(struct virtqueue *vq)
{
- struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev);
-
/* we write the queue's selector into the notification register to
* signal the other end */
- iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY);
+ iowrite16(vq->index, (void __iomem *)vq->priv);
return true;
}
@@ -437,6 +435,7 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
goto out_activate_queue;
}
+ vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
info->v...
2015 Mar 11
0
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...> @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> > > > }
> > > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> > > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> > > > - true, n, notifier);
> > > > + true, cpu_to_host_notifier16(vdev, n),
> > > > + notifier);
> > > > } else {
> > > >...
2011 Nov 22
2
[PATCHv3 RFC] virtio-pci: flexible configuration layout
...d PIO which has this size limit.
+ * */
+ m = virtio_pci_set_legacy_map(vp_dev);
+ if (!m) {
+ dev_err(&vp_dev->vdev.dev, "Unable to map legacy PIO");
+ goto err;
+ }
+ vp_dev->ioaddr = m;
+ vp_dev->ioaddr_isr = m + VIRTIO_PCI_ISR;
+ vp_dev->ioaddr_notify = m + VIRTIO_PCI_QUEUE_NOTIFY;
+ vp_dev->ioaddr_device = m + VIRTIO_PCI_CONFIG(vp_dev);
+ }
+
+ return 0;
+err:
+ virtio_pci_iounmap(vp_dev);
+ return -EINVAL;
+}
+
/* Constants for MSI-X */
/* Use first vector for configuration changes, second and the rest for
* virtqueues Thus, we need at least 2 vectors for MSI. */
@...
2011 Nov 22
2
[PATCHv3 RFC] virtio-pci: flexible configuration layout
...d PIO which has this size limit.
+ * */
+ m = virtio_pci_set_legacy_map(vp_dev);
+ if (!m) {
+ dev_err(&vp_dev->vdev.dev, "Unable to map legacy PIO");
+ goto err;
+ }
+ vp_dev->ioaddr = m;
+ vp_dev->ioaddr_isr = m + VIRTIO_PCI_ISR;
+ vp_dev->ioaddr_notify = m + VIRTIO_PCI_QUEUE_NOTIFY;
+ vp_dev->ioaddr_device = m + VIRTIO_PCI_CONFIG(vp_dev);
+ }
+
+ return 0;
+err:
+ virtio_pci_iounmap(vp_dev);
+ return -EINVAL;
+}
+
/* Constants for MSI-X */
/* Use first vector for configuration changes, second and the rest for
* virtqueues Thus, we need at least 2 vectors for MSI. */
@...
2015 Mar 11
0
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...nt n, bool assign, bool set_handler)
> {
> @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> }
> virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> - true, n, notifier);
> + true, cpu_to_host_notifier16(vdev, n),
> + notifier);
> } else {
> memory_region_del_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2...
2015 Mar 11
0
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...nt n, bool assign, bool set_handler)
> {
> @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> }
> virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> - true, n, notifier);
> + true, cpu_to_host_notifier16(vdev, n),
> + notifier);
> } else {
> memory_region_del_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2...
2014 Dec 03
1
[PATCH RFC 1/2] virtio_pci: free up vq->priv
We don't need to go from vq to vq info on
data path, so using direct vq->priv pointer for that
seems like a waste.
Let's build an array of vq infos, then we can use vq->index
for that lookup.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/virtio/virtio_pci.c | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
2014 Dec 03
1
[PATCH RFC 1/2] virtio_pci: free up vq->priv
We don't need to go from vq to vq info on
data path, so using direct vq->priv pointer for that
seems like a waste.
Let's build an array of vq infos, then we can use vq->index
for that lookup.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/virtio/virtio_pci.c | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
2015 Mar 12
0
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...; {
> > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> > > }
> > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> > > - true, n, notifier);
> > > + true, cpu_to_host_notifier16(vdev, n),
> > > + notifier);
> > > } else {
> > > memory_region_del_even...
2015 Mar 12
0
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...; {
> > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
> > > }
> > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
> > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2,
> > > - true, n, notifier);
> > > + true, cpu_to_host_notifier16(vdev, n),
> > > + notifier);
> > > } else {
> > > memory_region_del_even...
2009 May 07
1
[PATCH 2/3] virtio_pci: split up vp_interrupt
...letions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 3671c42..f7b79a2 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq)
iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY);
}
+/* Handle a configuration change: Tell driver if it wants to know. */
+static irqreturn_t vp_config_changed(int irq, void *opaque)
+{
+ struct virtio_pci_device *vp_dev = opaque;
+ struct virtio_driver *drv;
+ drv = container_of(vp_dev->vdev.dev.driver,
+ struct virtio_driver, drive...
2009 May 07
1
[PATCH 2/3] virtio_pci: split up vp_interrupt
...letions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 3671c42..f7b79a2 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq)
iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY);
}
+/* Handle a configuration change: Tell driver if it wants to know. */
+static irqreturn_t vp_config_changed(int irq, void *opaque)
+{
+ struct virtio_pci_device *vp_dev = opaque;
+ struct virtio_driver *drv;
+ drv = container_of(vp_dev->vdev.dev.driver,
+ struct virtio_driver, drive...