search for: vp_config_vector

Displaying 20 results from an estimated 47 matches for "vp_config_vector".

2014 Dec 08
0
[PATCH v2 07/10] virtio_pci: setup config vector indirectly
...u16 msix_vec); void (*del_vq)(struct virtio_pci_vq_info *info); + u16 (*config_vector)(struct virtio_pci_device *vp_dev, u16 vector); }; /* Constants for MSI-X */ @@ -271,6 +272,15 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) return vp_vring_interrupt(irq, opaque); } +u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) +{ + /* Setup the vector used for configuration events */ + iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); + /* Verify we had enough resources to assign the vector */ + /* Will also flush the write out to device */ + return ioread16(vp...
2015 Jan 15
1
[PATCH] virtio_pci_modern: validate features
...76,12 +677,19 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) vp_dev->vdev.config = &virtio_pci_config_nodev_ops; } + features = vp_get_features(vdev); + if (!features & (1ULL << VIRTIO_F_VERSION_1)) + goto err_valid_features; + vp_dev->config_vector = vp_config_vector; vp_dev->setup_vq = setup_vq; vp_dev->del_vq = del_vq; return 0; +err_valid_features: + if (vp_dev->device) + pci_iounmap(pci_dev, vp_dev->device); err_map_device: if (vp_dev->notify_base) pci_iounmap(pci_dev, vp_dev->notify_base); -- MST
2014 Dec 08
0
[PATCH v2 07/10] virtio_pci: setup config vector indirectly
...u16 msix_vec); void (*del_vq)(struct virtio_pci_vq_info *info); + u16 (*config_vector)(struct virtio_pci_device *vp_dev, u16 vector); }; /* Constants for MSI-X */ @@ -271,6 +272,15 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) return vp_vring_interrupt(irq, opaque); } +u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) +{ + /* Setup the vector used for configuration events */ + iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); + /* Verify we had enough resources to assign the vector */ + /* Will also flush the write out to device */ + return ioread16(vp...
2015 Jan 15
1
[PATCH] virtio_pci_modern: validate features
...76,12 +677,19 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) vp_dev->vdev.config = &virtio_pci_config_nodev_ops; } + features = vp_get_features(vdev); + if (!features & (1ULL << VIRTIO_F_VERSION_1)) + goto err_valid_features; + vp_dev->config_vector = vp_config_vector; vp_dev->setup_vq = setup_vq; vp_dev->del_vq = del_vq; return 0; +err_valid_features: + if (vp_dev->device) + pci_iounmap(pci_dev, vp_dev->device); err_map_device: if (vp_dev->notify_base) pci_iounmap(pci_dev, vp_dev->notify_base); -- MST
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 >
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
..._notify(struct virtqueue *vq) +bool vp_notify(struct virtqueue *vq) { /* we write the queue's selector into the notification register to * signal the other end */ @@ -272,15 +91,6 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) return vp_vring_interrupt(irq, opaque); } -u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) -{ - /* Setup the vector used for configuration events */ - iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); - /* Verify we had enough resources to assign the vector */ - /* Will also flush the write out to device */ - return ioread16(vp...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
..._notify(struct virtqueue *vq) +bool vp_notify(struct virtqueue *vq) { /* we write the queue's selector into the notification register to * signal the other end */ @@ -272,15 +91,6 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) return vp_vring_interrupt(irq, opaque); } -u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) -{ - /* Setup the vector used for configuration events */ - iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); - /* Verify we had enough resources to assign the vector */ - /* Will also flush the write out to device */ - return ioread16(vp...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
..._notify(struct virtqueue *vq) +bool vp_notify(struct virtqueue *vq) { /* we write the queue's selector into the notification register to * signal the other end */ @@ -272,15 +91,6 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) return vp_vring_interrupt(irq, opaque); } -u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) -{ - /* Setup the vector used for configuration events */ - iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); - /* Verify we had enough resources to assign the vector */ - /* Will also flush the write out to device */ - return ioread16(vp...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
..._notify(struct virtqueue *vq) +bool vp_notify(struct virtqueue *vq) { /* we write the queue's selector into the notification register to * signal the other end */ @@ -272,15 +91,6 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) return vp_vring_interrupt(irq, opaque); } -u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) -{ - /* Setup the vector used for configuration events */ - iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); - /* Verify we had enough resources to assign the vector */ - /* Will also flush the write out to device */ - return ioread16(vp...
2017 Jan 27
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
...u16 (*config_vector)(struct virtio_pci_device *vp_dev, u16 vector); }; diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 6d9e517..47292da 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -112,7 +112,6 @@ static u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) } static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, - struct virtio_pci_vq_info *info, unsigned index, void (*callback)(struct virtqueue *vq), const char *name, @@ -130,8 +129,6 @@ static struct virtqueue...
2017 Feb 05
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
...ig_vector)(struct virtio_pci_device *vp_dev, u16 vector); }; diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 6d9e5173d5fa..47292dad0ff9 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -112,7 +112,6 @@ static u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) } static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, - struct virtio_pci_vq_info *info, unsigned index, void (*callback)(struct virtqueue *vq), const char *name, @@ -130,8 +129,6 @@ static struct virtqueue...
2017 Feb 07
0
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
...ig_vector)(struct virtio_pci_device *vp_dev, u16 vector); }; diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 6d9e5173d5fa..47292dad0ff9 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -112,7 +112,6 @@ static u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) } static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, - struct virtio_pci_vq_info *info, unsigned index, void (*callback)(struct virtqueue *vq), const char *name, @@ -130,8 +129,6 @@ static struct virtqueue...
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
2023 Mar 23
1
[PATCH v4] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...; > goto error_new_virtqueue; > diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c > index 9e496e288cfa..9cc56f463dba 100644 > --- a/drivers/virtio/virtio_pci_modern.c > +++ b/drivers/virtio/virtio_pci_modern.c > @@ -288,6 +288,15 @@ static u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) > return vp_modern_config_vector(&vp_dev->mdev, vector); > } > > +static bool vp_notify_with_data(struct virtqueue *vq) > +{ > + u32 data = vring_notification_data(vq); > + > + iowrite32(data, (void __iomem *)vq->pri...
2023 Mar 23
1
[PATCH v4] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c > > > index 9e496e288cfa..9cc56f463dba 100644 > > > --- a/drivers/virtio/virtio_pci_modern.c > > > +++ b/drivers/virtio/virtio_pci_modern.c > > > @@ -288,6 +288,15 @@ static u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) > > > return vp_modern_config_vector(&vp_dev->mdev, vector); > > > } > > > > > > +static bool vp_notify_with_data(struct virtqueue *vq) > > > +{ > > > + u32 data = vring_notificatio...
2015 Jan 21
9
[PATCH post-squash 0/9] virtio 1.0: virtio-pci fixup
This is just repost of all patches with fixups squashed in - convenient if you just want to remove old ones from queue and apply new ones. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree:
2015 Jan 21
9
[PATCH post-squash 0/9] virtio 1.0: virtio-pci fixup
This is just repost of all patches with fixups squashed in - convenient if you just want to remove old ones from queue and apply new ones. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree:
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...&vp_dev->common->device_status); + /* Flush out the status write, and flush in device writes, + * including MSI-X interrupts, if any. */ + ioread8(&vp_dev->common->device_status); + /* Flush pending VQ/configuration callbacks. */ + vp_synchronize_vectors(vdev); +} + +static u16 vp_config_vector(struct virtio_pci_device *vp_dev, u16 vector) +{ + /* Setup the vector used for configuration events */ + iowrite16(vector, &vp_dev->common->msix_config); + /* Verify we had enough resources to assign the vector */ + /* Will also flush the write out to device */ + return ioread16(&vp_...