Displaying 20 results from an estimated 40 matches for "virtio_pci_status".
2011 Nov 17
1
[PATCH] virtio-pci: make reset operation safer
...(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index d242fcc..cb1090e 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -321,11 +321,29 @@ static void vp_set_status(struct virtio_device *vdev, u8 status)
iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS);
}
+/* wait for pending irq handlers */
+static void vp_synchronize_vectors(struct virtio_device *vdev)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ int i;
+
+ if (vp_dev->intx_enabled)
+ synchronize_irq(vp_dev->pci_dev->irq);
+
+ for (i = 0; i < vp_dev->msix_ve...
2011 Nov 17
1
[PATCH] virtio-pci: make reset operation safer
...(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index d242fcc..cb1090e 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -321,11 +321,29 @@ static void vp_set_status(struct virtio_device *vdev, u8 status)
iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS);
}
+/* wait for pending irq handlers */
+static void vp_synchronize_vectors(struct virtio_device *vdev)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ int i;
+
+ if (vp_dev->intx_enabled)
+ synchronize_irq(vp_dev->pci_dev->irq);
+
+ for (i = 0; i < vp_dev->msix_ve...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
...t u8 *ptr = buf;
- int i;
-
- for (i = 0; i < len; i++)
- iowrite8(ptr[i], ioaddr + i);
-}
-
-/* config->{get,set}_status() implementations */
-static u8 vp_get_status(struct virtio_device *vdev)
-{
- struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- return ioread8(vp_dev->ioaddr + VIRTIO_PCI_STATUS);
-}
-
-static void vp_set_status(struct virtio_device *vdev, u8 status)
-{
- struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- /* We should never be setting status to 0. */
- BUG_ON(status == 0);
- iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS);
-}
+#include "virtio_pci_legacy...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
...t u8 *ptr = buf;
- int i;
-
- for (i = 0; i < len; i++)
- iowrite8(ptr[i], ioaddr + i);
-}
-
-/* config->{get,set}_status() implementations */
-static u8 vp_get_status(struct virtio_device *vdev)
-{
- struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- return ioread8(vp_dev->ioaddr + VIRTIO_PCI_STATUS);
-}
-
-static void vp_set_status(struct virtio_device *vdev, u8 status)
-{
- struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- /* We should never be setting status to 0. */
- BUG_ON(status == 0);
- iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS);
-}
+#include "virtio_pci_legacy...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
...t u8 *ptr = buf;
- int i;
-
- for (i = 0; i < len; i++)
- iowrite8(ptr[i], ioaddr + i);
-}
-
-/* config->{get,set}_status() implementations */
-static u8 vp_get_status(struct virtio_device *vdev)
-{
- struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- return ioread8(vp_dev->ioaddr + VIRTIO_PCI_STATUS);
-}
-
-static void vp_set_status(struct virtio_device *vdev, u8 status)
-{
- struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- /* We should never be setting status to 0. */
- BUG_ON(status == 0);
- iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS);
-}
+#include "virtio_pci.h"...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
...t u8 *ptr = buf;
- int i;
-
- for (i = 0; i < len; i++)
- iowrite8(ptr[i], ioaddr + i);
-}
-
-/* config->{get,set}_status() implementations */
-static u8 vp_get_status(struct virtio_device *vdev)
-{
- struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- return ioread8(vp_dev->ioaddr + VIRTIO_PCI_STATUS);
-}
-
-static void vp_set_status(struct virtio_device *vdev, u8 status)
-{
- struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- /* We should never be setting status to 0. */
- BUG_ON(status == 0);
- iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS);
-}
+#include "virtio_pci.h"...
2008 Jan 23
2
[PATCH 1/2] reset support: make net driver alloc/cleanup in probe and remove
Since we want to reset the device to remove them, this is simpler
(device is reset for us on driver remove).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/net/virtio_net.c | 44 +++++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 19 deletions(-)
diff -r 7e5b3ff06f60 drivers/net/virtio_net.c
--- a/drivers/net/virtio_net.c Wed Jan 23 22:53:14
2008 Jan 23
2
[PATCH 1/2] reset support: make net driver alloc/cleanup in probe and remove
Since we want to reset the device to remove them, this is simpler
(device is reset for us on driver remove).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/net/virtio_net.c | 44 +++++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 19 deletions(-)
diff -r 7e5b3ff06f60 drivers/net/virtio_net.c
--- a/drivers/net/virtio_net.c Wed Jan 23 22:53:14
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 05/13] [Mostly resend] virtio additions
...int i;
+
+ for (i = 0; i < len; i++)
+ iowrite8(ptr[i], ioaddr + i);
+}
+
+/* config->{get,set}_status() implementations */
+static u8 vp_get_status(struct virtio_device *vdev)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ return ioread8(vp_dev->ioaddr + VIRTIO_PCI_STATUS);
+}
+
+static void vp_set_status(struct virtio_device *vdev, u8 status)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ return iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS);
+}
+
+/* the notify function used when creating a virt queue */
+static void vp_notify(struct...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 05/13] [Mostly resend] virtio additions
...int i;
+
+ for (i = 0; i < len; i++)
+ iowrite8(ptr[i], ioaddr + i);
+}
+
+/* config->{get,set}_status() implementations */
+static u8 vp_get_status(struct virtio_device *vdev)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ return ioread8(vp_dev->ioaddr + VIRTIO_PCI_STATUS);
+}
+
+static void vp_set_status(struct virtio_device *vdev, u8 status)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ return iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS);
+}
+
+/* the notify function used when creating a virt queue */
+static void vp_notify(struct...
2014 Dec 08
11
[PATCH 0/9] virtio_pci: split out legacy device support
virtio 1.0 support for virtio-pci isn't ready yet.
Therefore, this patchset doesn't make any functional changes.
Instead, this simply refactors virtio-pci, splitting legacy
device support code out to a separate file: virtio_pci_legacy.c
For virtio 1.0, all that's left is to add virtio_pci_modern.c
supporting
get_features
finalize_features
get (config)
set (config)
get_status
2014 Dec 08
11
[PATCH 0/9] virtio_pci: split out legacy device support
virtio 1.0 support for virtio-pci isn't ready yet.
Therefore, this patchset doesn't make any functional changes.
Instead, this simply refactors virtio-pci, splitting legacy
device support code out to a separate file: virtio_pci_legacy.c
For virtio 1.0, all that's left is to add virtio_pci_modern.c
supporting
get_features
finalize_features
get (config)
set (config)
get_status
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...r/o queue size for the currently selected queue */
+#define VIRTIO_PCI_QUEUE_NUM 12
+
+/* A 16-bit r/w queue selector */
+#define VIRTIO_PCI_QUEUE_SEL 14
+
+/* A 16-bit r/w queue notifier */
+#define VIRTIO_PCI_QUEUE_NOTIFY 16
+
+/* An 8-bit device status register. */
+#define VIRTIO_PCI_STATUS 18
+
+/* An 8-bit r/o interrupt status register. Reading the value will
return the
+ * current contents of the ISR and will also clear it. This is effectively
+ * a read-and-acknowledge. */
+#define VIRTIO_PCI_ISR 19
+
+#define VIRTIO_PCI_CONFIG 20
+
+/* QEMU doesn't...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...r/o queue size for the currently selected queue */
+#define VIRTIO_PCI_QUEUE_NUM 12
+
+/* A 16-bit r/w queue selector */
+#define VIRTIO_PCI_QUEUE_SEL 14
+
+/* A 16-bit r/w queue notifier */
+#define VIRTIO_PCI_QUEUE_NOTIFY 16
+
+/* An 8-bit device status register. */
+#define VIRTIO_PCI_STATUS 18
+
+/* An 8-bit r/o interrupt status register. Reading the value will
return the
+ * current contents of the ISR and will also clear it. This is effectively
+ * a read-and-acknowledge. */
+#define VIRTIO_PCI_ISR 19
+
+#define VIRTIO_PCI_CONFIG 20
+
+/* QEMU doesn't...
2011 Dec 08
14
[PATCH 0/11] RFC: PCI using capabilitities
Here's the patch series I ended up with. I haven't coded up the QEMU
side yet, so no idea if the new driver works.
Questions:
(1) Do we win from separating ISR, NOTIFY and COMMON?
(2) I used a "u8 bar"; should I use a bir and pack it instead? BIR
seems a little obscure (noone else in the kernel source seems to
refer to it).
Cheers,
Rusty.
2011 Dec 08
14
[PATCH 0/11] RFC: PCI using capabilitities
Here's the patch series I ended up with. I haven't coded up the QEMU
side yet, so no idea if the new driver works.
Questions:
(1) Do we win from separating ISR, NOTIFY and COMMON?
(2) I used a "u8 bar"; should I use a bir and pack it instead? BIR
seems a little obscure (noone else in the kernel source seems to
refer to it).
Cheers,
Rusty.
2011 Nov 22
2
[PATCHv3 RFC] virtio-pci: flexible configuration layout
Here's an updated vesion.
I'm alternating between updating the spec and the driver,
spec update to follow.
Compiled only. Posting here for early feedback, and to allow Sasha to
proceed with his "kvm tool" work.
Changes from v2:
address comments by Rusty
bugfixes by Sasha
Changes from v1:
Updated to match v3 of the spec, see:
todo:
split core changes out
Signed-off-by:
2011 Nov 22
2
[PATCHv3 RFC] virtio-pci: flexible configuration layout
Here's an updated vesion.
I'm alternating between updating the spec and the driver,
spec update to follow.
Compiled only. Posting here for early feedback, and to allow Sasha to
proceed with his "kvm tool" work.
Changes from v2:
address comments by Rusty
bugfixes by Sasha
Changes from v1:
Updated to match v3 of the spec, see:
todo:
split core changes out
Signed-off-by:
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...rtio_pci_reset(proxy);
+ else
+ virtio_queue_set_addr(vdev, vdev->queue_sel, pa);
break;
case VIRTIO_PCI_QUEUE_SEL:
if (val < VIRTIO_PCI_QUEUE_MAX)
@@ -120,7 +129,7 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
case VIRTIO_PCI_STATUS:
vdev->status = val & 0xFF;
if (vdev->status == 0)
- virtio_reset(vdev);
+ virtio_pci_reset(proxy);
break;
}
}
@@ -158,7 +167,7 @@ static uint32_t virtio_ioport_read(void *opaque, uint32_t addr)
/* reading from the ISR also c...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...rtio_pci_reset(proxy);
+ else
+ virtio_queue_set_addr(vdev, vdev->queue_sel, pa);
break;
case VIRTIO_PCI_QUEUE_SEL:
if (val < VIRTIO_PCI_QUEUE_MAX)
@@ -120,7 +129,7 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
case VIRTIO_PCI_STATUS:
vdev->status = val & 0xFF;
if (vdev->status == 0)
- virtio_reset(vdev);
+ virtio_pci_reset(proxy);
break;
}
}
@@ -158,7 +167,7 @@ static uint32_t virtio_ioport_read(void *opaque, uint32_t addr)
/* reading from the ISR also c...