search for: error_avail

Displaying 20 results from an estimated 48 matches for "error_avail".

Did you mean: err_avail
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...me) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - struct virtio_mmio_vq_info *info; struct virtqueue *vq; - unsigned long flags; unsigned int num; int err; @@ -372,13 +346,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, goto error_available; } - /* Allocate and fill out our active queue description */ - info = kmalloc(sizeof(*info), GFP_KERNEL); - if (!info) { - err = -ENOMEM; - goto error_kmalloc; - } - num = readl(vm_dev->base + VIRTIO_MMIO_QUEUE_NUM_MAX); if (num == 0) { err = -ENOENT; @@ -420,13 +387,6 @@ stati...
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...me) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - struct virtio_mmio_vq_info *info; struct virtqueue *vq; - unsigned long flags; unsigned int num; int err; @@ -372,13 +346,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, goto error_available; } - /* Allocate and fill out our active queue description */ - info = kmalloc(sizeof(*info), GFP_KERNEL); - if (!info) { - err = -ENOMEM; - goto error_kmalloc; - } - num = readl(vm_dev->base + VIRTIO_MMIO_QUEUE_NUM_MAX); if (num == 0) { err = -ENOENT; @@ -420,13 +387,6 @@ stati...
2014 Oct 25
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...spin_lock_irqsave(&vm_dev->lock, flags); + list_for_each_entry(info, &vm_dev->virtqueues, node) + ret |= vring_interrupt(irq, info->vq); + spin_unlock_irqrestore(&vm_dev->lock, flags); + + return ret; +} static void vm_del_vq(struct virtqueue *vq) { @@ -391,6 +415,7 @@ error_available: return ERR_PTR(err); } +#define VIRTIO_MMIO_F_IRQFD (1 << 7) static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], @@ -400,8 +425,13 @@ static int vm_find_vqs(struct virtio_device *vdev, uns...
2014 Oct 25
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...spin_lock_irqsave(&vm_dev->lock, flags); + list_for_each_entry(info, &vm_dev->virtqueues, node) + ret |= vring_interrupt(irq, info->vq); + spin_unlock_irqrestore(&vm_dev->lock, flags); + + return ret; +} static void vm_del_vq(struct virtqueue *vq) { @@ -391,6 +415,7 @@ error_available: return ERR_PTR(err); } +#define VIRTIO_MMIO_F_IRQFD (1 << 7) static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], @@ -400,8 +425,13 @@ static int vm_find_vqs(struct virtio_device *vdev, uns...
2014 Oct 27
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...;vm_dev->lock, flags); >> + >> + return ret; >> +} >> >> static void vm_del_vq(struct virtqueue *vq) >> { > > So you invoke callbacks for all VQs. > This won't scale well as the number of VQs grows, will it? > >> @@ -391,6 +415,7 @@ error_available: >> return ERR_PTR(err); >> } >> >> +#define VIRTIO_MMIO_F_IRQFD (1 << 7) >> static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, >> struct virtqueue *vqs[], >> vq_callback_t *callbacks[], >> @@...
2014 Oct 27
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...;vm_dev->lock, flags); >> + >> + return ret; >> +} >> >> static void vm_del_vq(struct virtqueue *vq) >> { > > So you invoke callbacks for all VQs. > This won't scale well as the number of VQs grows, will it? > >> @@ -391,6 +415,7 @@ error_available: >> return ERR_PTR(err); >> } >> >> +#define VIRTIO_MMIO_F_IRQFD (1 << 7) >> static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, >> struct virtqueue *vqs[], >> vq_callback_t *callbacks[], >> @@...
2014 Oct 26
0
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...info->vq); > + spin_unlock_irqrestore(&vm_dev->lock, flags); > + > + return ret; > +} > > static void vm_del_vq(struct virtqueue *vq) > { So you invoke callbacks for all VQs. This won't scale well as the number of VQs grows, will it? > @@ -391,6 +415,7 @@ error_available: > return ERR_PTR(err); > } > > +#define VIRTIO_MMIO_F_IRQFD (1 << 7) > static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, > struct virtqueue *vqs[], > vq_callback_t *callbacks[], > @@ -400,8 +425,13 @@ static int vm_...
2014 Oct 27
0
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...+ return ret; > >> +} > >> > >> static void vm_del_vq(struct virtqueue *vq) > >> { > > > > So you invoke callbacks for all VQs. > > This won't scale well as the number of VQs grows, will it? > > > >> @@ -391,6 +415,7 @@ error_available: > >> return ERR_PTR(err); > >> } > >> > >> +#define VIRTIO_MMIO_F_IRQFD (1 << 7) > >> static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, > >> struct virtqueue *vqs[], > >> vq_ca...
2019 Sep 24
0
[PATCH 4/6] virtio: introduce a mdev based transport
..., num; >> + u64 desc_addr, driver_addr, device_addr; >> + int err; >> + >> + if (!name) >> + return NULL; >> + >> + /* Queue shouldn't already be set up. */ >> + if (ops->get_vq_ready(mdev, index)) { >> + err = -ENOENT; >> + goto error_available; >> + } >> + > No need for a goto, to single return done later. > Just do > if (ops->get_vq_ready(mdev, index)) > return -ENOENT; Ok, will fix. > >> + /* Allocate and fill out our active queue description */ >> + info = kmalloc(sizeof(*info), GF...
2015 Dec 17
1
[PATCH] virtio: make find_vqs() checkpatch.pl-friendly
...status" }; int err; err = vi->vdev->config->find_vqs(vi->vdev, 2, vqs, cbs, names); diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index f499d9d..745c6ee 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -482,7 +482,7 @@ error_available: static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char *names[]) + const char * const names[]) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); unsigned int...
2015 Dec 17
1
[PATCH] virtio: make find_vqs() checkpatch.pl-friendly
...status" }; int err; err = vi->vdev->config->find_vqs(vi->vdev, 2, vqs, cbs, names); diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index f499d9d..745c6ee 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -482,7 +482,7 @@ error_available: static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char *names[]) + const char * const names[]) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); unsigned int...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...err; + + if (!name) + return NULL; + + /* Select the queue we're interested in */ + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_SEL, index); + + /* Queue shouldn't already be set up. */ + if (virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY)) { + err = -ENOENT; + goto error_available; + } + + /* Allocate and fill out our active queue description */ + info = kmalloc(sizeof(*info), GFP_KERNEL); + if (!info) { + err = -ENOMEM; + goto error_kmalloc; + } + + num = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_NUM_MAX); + if (num == 0) { + err = -ENOENT; + goto error_n...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...m_dev); >> + if (!err) >> + vm_dev->single_irq_enabled = 1; >> + return err; >> +} >> >> static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, >> void (*callback)(struct virtqueue *vq), >> @@ -392,29 +501,92 @@ error_available: >> return ERR_PTR(err); >> } >> >> -static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, >> - struct virtqueue *vqs[], >> - vq_callback_t *callbacks[], >> - const char *names[]) >> +static int vm_try_to_f...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...m_dev); >> + if (!err) >> + vm_dev->single_irq_enabled = 1; >> + return err; >> +} >> >> static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, >> void (*callback)(struct virtqueue *vq), >> @@ -392,29 +501,92 @@ error_available: >> return ERR_PTR(err); >> } >> >> -static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, >> - struct virtqueue *vqs[], >> - vq_callback_t *callbacks[], >> - const char *names[]) >> +static int vm_try_to_f...
2014 Oct 25
8
[RFC PATCH 0/2] virtio-mmio: add irqfd support for vhost-net based on virtio-mmio
From: Li Liu <john.liuli at huawei.com> This set of patches try to implemet irqfd support of vhost-net based on virtio-mmio. I had posted a mail to talking about the status of vhost-net on kvm-arm refer to http://www.spinics.net/lists/kvm-arm/msg10804.html. Some dependent patches are listed in the mail too. Basically the vhost-net brings great performance improvements, almost 50%+.
2014 Oct 25
8
[RFC PATCH 0/2] virtio-mmio: add irqfd support for vhost-net based on virtio-mmio
From: Li Liu <john.liuli at huawei.com> This set of patches try to implemet irqfd support of vhost-net based on virtio-mmio. I had posted a mail to talking about the status of vhost-net on kvm-arm refer to http://www.spinics.net/lists/kvm-arm/msg10804.html. Some dependent patches are listed in the mail too. Basically the vhost-net brings great performance improvements, almost 50%+.
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?
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...dev_name(&vdev->dev), vm_dev); > + if (!err) > + vm_dev->single_irq_enabled = 1; > + return err; > +} > > static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, > void (*callback)(struct virtqueue *vq), > @@ -392,29 +501,92 @@ error_available: > return ERR_PTR(err); > } > > -static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, > - struct virtqueue *vqs[], > - vq_callback_t *callbacks[], > - const char *names[]) > +static int vm_try_to_find_vqs(struct virtio_device *vd...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...+ > + /* Select the queue we're interested in */ > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_SEL, index); > + > + /* Queue shouldn't already be set up. */ > + if (virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY)) { > + err = -ENOENT; > + goto error_available; > + } > + > + /* Allocate and fill out our active queue description */ > + info = kmalloc(sizeof(*info), GFP_KERNEL); > + if (!info) { > + err = -ENOMEM; > + goto error_kmalloc; > + } > + > + num = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_NUM_MAX); &...