search for: virtio_pci_vq_info

Displaying 20 results from an estimated 181 matches for "virtio_pci_vq_info".

2017 Feb 07
2
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?02?06? 01:15, Christoph Hellwig wrote: > We don't really need struct virtio_pci_vq_info, as most field in there > are redundant: > > - the vq backpointer is not strictly neede to start with > - the entry in the vqs list is not needed - the generic virtqueue already > has list, we only need to check if it has a callback to get the same > semantics > -...
2017 Feb 07
2
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?02?06? 01:15, Christoph Hellwig wrote: > We don't really need struct virtio_pci_vq_info, as most field in there > are redundant: > > - the vq backpointer is not strictly neede to start with > - the entry in the vqs list is not needed - the generic virtqueue already > has list, we only need to check if it has a callback to get the same > semantics > -...
2017 Feb 07
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
...rote: > The check is still there. Meh, I could swear I fixed it up. Here is an updated version: --- >From bf5e3b7fd272aea32388570503f00d0ab592fc2a Mon Sep 17 00:00:00 2001 From: Christoph Hellwig <hch at lst.de> Date: Wed, 25 Jan 2017 13:40:21 +0100 Subject: virtio_pci: remove struct virtio_pci_vq_info We don't really need struct virtio_pci_vq_info, as most field in there are redundant: - the vq backpointer is not strictly neede to start with - the entry in the vqs list is not needed - the generic virtqueue already has list, we only need to check if it has a callback to get the same...
2017 Jan 27
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
We don't really need struct virtio_pci_vq_info, as most field in there are redundant: - the vq backpointer is not strictly neede to start with - the entry in the vqs list is not needed - the generic virtqueue already has list, we only need to check if it has a callback to get the same semantics - we can use a simple array to look up t...
2017 Feb 05
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
We don't really need struct virtio_pci_vq_info, as most field in there are redundant: - the vq backpointer is not strictly neede to start with - the entry in the vqs list is not needed - the generic virtqueue already has list, we only need to check if it has a callback to get the same semantics - we can use a simple array to look up t...
2017 Feb 03
1
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?01?27? 16:16, Christoph Hellwig wrote: > We don't really need struct virtio_pci_vq_info, as most field in there > are redundant: > > - the vq backpointer is not strictly neede to start with > - the entry in the vqs list is not needed - the generic virtqueue already > has list, we only need to check if it has a callback to get the same > semantics > -...
2017 Feb 03
1
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?01?27? 16:16, Christoph Hellwig wrote: > We don't really need struct virtio_pci_vq_info, as most field in there > are redundant: > > - the vq backpointer is not strictly neede to start with > - the entry in the vqs list is not needed - the generic virtqueue already > has list, we only need to check if it has a callback to get the same > semantics > -...
2014 Dec 08
0
[PATCH v2 03/10] virtio_pci: free up vq->priv
...it a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 6f3db1f..6a7b8bf 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -31,6 +31,23 @@ MODULE_DESCRIPTION("virtio-pci"); MODULE_LICENSE("GPL"); MODULE_VERSION("1"); +struct virtio_pci_vq_info { + /* the actual virtqueue */ + struct virtqueue *vq; + + /* the number of entries in the queue */ + int num; + + /* the virtual address of the ring queue */ + void *queue; + + /* the list node for the virtqueues list */ + struct list_head node; + + /* MSI-X vector (or none) */ + unsigned msix_vec...
2014 Dec 08
0
[PATCH v2 03/10] virtio_pci: free up vq->priv
...it a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 6f3db1f..6a7b8bf 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -31,6 +31,23 @@ MODULE_DESCRIPTION("virtio-pci"); MODULE_LICENSE("GPL"); MODULE_VERSION("1"); +struct virtio_pci_vq_info { + /* the actual virtqueue */ + struct virtqueue *vq; + + /* the number of entries in the queue */ + int num; + + /* the virtual address of the ring queue */ + void *queue; + + /* the list node for the virtqueues list */ + struct list_head node; + + /* MSI-X vector (or none) */ + unsigned msix_vec...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...io_pci.c index 133978c..68023e5 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -82,6 +82,12 @@ struct virtio_pci_device { /* Whether we have vector per vq */ bool per_vq_vectors; + struct virtqueue *(*setup_vq)(struct virtio_pci_device *vp_dev, + struct virtio_pci_vq_info *info, + unsigned idx, + void (*callback)(struct virtqueue *vq), + const char *name, + u16 msix_vec); void (*del_vq)(struct virtio_pci_vq_info *info); }; @@ -389,15 +395,15 @@ static int vp_request_intx(struct virtio_device *vdev) return err; } -static...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...io_pci.c index 133978c..68023e5 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -82,6 +82,12 @@ struct virtio_pci_device { /* Whether we have vector per vq */ bool per_vq_vectors; + struct virtqueue *(*setup_vq)(struct virtio_pci_device *vp_dev, + struct virtio_pci_vq_info *info, + unsigned idx, + void (*callback)(struct virtqueue *vq), + const char *name, + u16 msix_vec); void (*del_vq)(struct virtio_pci_vq_info *info); }; @@ -389,15 +395,15 @@ static int vp_request_intx(struct virtio_device *vdev) return err; } -static...
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
2014 Dec 03
1
[PATCH RFC 1/2] virtio_pci: free up vq->priv
...virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 40b4d47..91b479b 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -47,6 +58,9 @@ struct virtio_pci_device { spinlock_t lock; struct list_head virtqueues; + /* array of all queues for house-keeping */ + struct virtio_pci_vq_info **vqs; + /* MSI-X support */ int msix_enabled; int intx_enabled; @@ -429,7 +432,6 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index, goto out_activate_queue; } - vq->priv = info; info->vq = vq; if (msix_vec != VIRTIO_MSI_NO_VECTOR) { @@ -449,6...
2014 Dec 03
1
[PATCH RFC 1/2] virtio_pci: free up vq->priv
...virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 40b4d47..91b479b 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -47,6 +58,9 @@ struct virtio_pci_device { spinlock_t lock; struct list_head virtqueues; + /* array of all queues for house-keeping */ + struct virtio_pci_vq_info **vqs; + /* MSI-X support */ int msix_enabled; int intx_enabled; @@ -429,7 +432,6 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index, goto out_activate_queue; } - vq->priv = info; info->vq = vq; if (msix_vec != VIRTIO_MSI_NO_VECTOR) { @@ -449,6...
2014 Dec 08
0
[PATCH v2 05/10] virtio_pci: delete vqs indirectly
...f --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 7b82eb5..133978c 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -81,6 +81,8 @@ struct virtio_pci_device { /* Whether we have vector per vq */ bool per_vq_vectors; + + void (*del_vq)(struct virtio_pci_vq_info *info); }; /* Constants for MSI-X */ @@ -468,15 +470,11 @@ out_info: return ERR_PTR(err); } -static void vp_del_vq(struct virtqueue *vq) +static void del_vq(struct virtio_pci_vq_info *info) { + struct virtqueue *vq = info->vq; struct virtio_pci_device *vp_dev = to_vp_device(vq->vd...
2014 Dec 08
0
[PATCH v2 05/10] virtio_pci: delete vqs indirectly
...f --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 7b82eb5..133978c 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -81,6 +81,8 @@ struct virtio_pci_device { /* Whether we have vector per vq */ bool per_vq_vectors; + + void (*del_vq)(struct virtio_pci_vq_info *info); }; /* Constants for MSI-X */ @@ -468,15 +470,11 @@ out_info: return ERR_PTR(err); } -static void vp_del_vq(struct virtqueue *vq) +static void del_vq(struct virtio_pci_vq_info *info) { + struct virtqueue *vq = info->vq; struct virtio_pci_device *vp_dev = to_vp_device(vq->vd...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
....h> +#include <linux/interrupt.h> +#include <linux/virtio.h> +#include <linux/virtio_config.h> +#include <linux/virtio_ring.h> +#define VIRTIO_PCI_NO_LEGACY +#include <linux/virtio_pci.h> +#include <linux/highmem.h> +#include <linux/spinlock.h> + +struct virtio_pci_vq_info { + /* the actual virtqueue */ + struct virtqueue *vq; + + /* the number of entries in the queue */ + int num; + + /* the virtual address of the ring queue */ + void *queue; + + /* the list node for the virtqueues list */ + struct list_head node; + + /* MSI-X vector (or none) */ + unsigned msix_vec...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
....h> +#include <linux/interrupt.h> +#include <linux/virtio.h> +#include <linux/virtio_config.h> +#include <linux/virtio_ring.h> +#define VIRTIO_PCI_NO_LEGACY +#include <linux/virtio_pci.h> +#include <linux/highmem.h> +#include <linux/spinlock.h> + +struct virtio_pci_vq_info { + /* the actual virtqueue */ + struct virtqueue *vq; + + /* the number of entries in the queue */ + int num; + + /* the virtual address of the ring queue */ + void *queue; + + /* the list node for the virtqueues list */ + struct list_head node; + + /* MSI-X vector (or none) */ + unsigned msix_vec...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
....h> +#include <linux/interrupt.h> +#include <linux/virtio.h> +#include <linux/virtio_config.h> +#include <linux/virtio_ring.h> +#define VIRTIO_PCI_NO_LEGACY +#include <linux/virtio_pci.h> +#include <linux/highmem.h> +#include <linux/spinlock.h> + +struct virtio_pci_vq_info { + /* the actual virtqueue */ + struct virtqueue *vq; + + /* the number of entries in the queue */ + int num; + + /* the virtual address of the ring queue */ + void *queue; + + /* the list node for the virtqueues list */ + struct list_head node; + + /* MSI-X vector (or none) */ + unsigned msix_vec...