search for: virtio_enable_vqs_ear

Displaying 18 results from an estimated 18 matches for "virtio_enable_vqs_ear".

2014 Oct 12
26
[PATCH v3 00/25] virtio: fix spec compliance issues
Rusty, please review this, and consider for this merge window. This fixes the following virtio spec compliance issues: 1. on restore, drivers use device before setting ACKNOWLEDGE and DRIVER bits 2. on probe, drivers aren't prepared to handle config interrupts arriving before probe returns 3. on probe, drivers use device before DRIVER_OK it set Note that 1 is a clear violation of virtio
2014 Oct 12
26
[PATCH v3 00/25] virtio: fix spec compliance issues
Rusty, please review this, and consider for this merge window. This fixes the following virtio spec compliance issues: 1. on restore, drivers use device before setting ACKNOWLEDGE and DRIVER bits 2. on probe, drivers aren't prepared to handle config interrupts arriving before probe returns 3. on probe, drivers use device before DRIVER_OK it set Note that 1 is a clear violation of virtio
2014 Oct 12
1
[PATCH v3 10/25] virtio: add API to enable VQs early
...ns(+) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index e8f8f71..e36403b 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -109,6 +109,23 @@ struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev, return vq; } +/** + * virtio_enable_vqs_early - enable vq use in probe function + * @vdev: the device + * + * Driver must call this to use vqs in the probe function. + * + * Note: vqs are enabled automatically after probe returns. + */ +static inline +void virtio_enable_vqs_early(struct virtio_device *dev) +{ + unsigned status = dev->conf...
2014 Oct 12
1
[PATCH v3 10/25] virtio: add API to enable VQs early
...ns(+) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index e8f8f71..e36403b 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -109,6 +109,23 @@ struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev, return vq; } +/** + * virtio_enable_vqs_early - enable vq use in probe function + * @vdev: the device + * + * Driver must call this to use vqs in the probe function. + * + * Note: vqs are enabled automatically after probe returns. + */ +static inline +void virtio_enable_vqs_early(struct virtio_device *dev) +{ + unsigned status = dev->conf...
2014 Oct 06
25
[PATCH v2 00/15] virtio: fix spec compliance issues
Rusty, I have a mind to include this patchset for this merge window. Any input on this? This fixes the following virtio spec compliance issues: 1. on restore, drivers use device before setting ACKNOWLEDGE and DRIVER bits 2. on probe, drivers aren't prepared to handle config interrupts arriving before probe returns 3. on probe, drivers use device before DRIVER_OK it set Note that 1 is a
2014 Oct 06
25
[PATCH v2 00/15] virtio: fix spec compliance issues
Rusty, I have a mind to include this patchset for this merge window. Any input on this? This fixes the following virtio spec compliance issues: 1. on restore, drivers use device before setting ACKNOWLEDGE and DRIVER bits 2. on probe, drivers aren't prepared to handle config interrupts arriving before probe returns 3. on probe, drivers use device before DRIVER_OK it set Note that 1 is a
2014 Oct 06
0
[PATCH v2 10/15] virtio: add API to enable VQs early
...ns(+) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index e8f8f71..e36403b 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -109,6 +109,23 @@ struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev, return vq; } +/** + * virtio_enable_vqs_early - enable vq use in probe function + * @vdev: the device + * + * Driver must call this to use vqs in the probe function. + * + * Note: vqs are enabled automatically after probe returns. + */ +static inline +void virtio_enable_vqs_early(struct virtio_device *dev) +{ + unsigned status = dev->conf...
2014 Oct 06
0
[PATCH v2 11/15] virtio_net: enable VQs early
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio net violated this rule by using receive VQs within probe. To fix, call virtio_enable_vqs_early before using VQs. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ef04d23..430f3ae 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/vir...
2014 Oct 06
0
[PATCH v2 12/15] virtio_blk: enable VQs early
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio block violated this rule by calling add_disk, which causes the VQ to be used directly within probe. To fix, call virtio_enable_vqs_early before using VQs. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/block/virtio_blk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 89ba8d6..46b04bf 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers...
2014 Oct 06
0
[PATCH v2 11/15] virtio_net: enable VQs early
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio net violated this rule by using receive VQs within probe. To fix, call virtio_enable_vqs_early before using VQs. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ef04d23..430f3ae 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/vir...
2014 Oct 06
0
[PATCH v2 12/15] virtio_blk: enable VQs early
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio block violated this rule by calling add_disk, which causes the VQ to be used directly within probe. To fix, call virtio_enable_vqs_early before using VQs. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/block/virtio_blk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 89ba8d6..46b04bf 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers...
2014 Oct 06
1
[PATCH 10/16] virtio: add API to enable VQs early
...nline > +void virtio_early_enable_vqs(struct virtio_device *dev) > +{ > + unsigned status = dev->config->get_status(dev); > + > + BUG_ON(status & VIRTIO_CONFIG_S_DRIVER_OK); > + dev->config->set_status(dev, status | VIRTIO_CONFIG_S_DRIVER_OK); > +} > + Maybe virtio_enable_vqs_early() instead? > static inline > const char *virtio_bus_name(struct virtio_device *vdev) > {
2014 Oct 06
1
[PATCH 10/16] virtio: add API to enable VQs early
...nline > +void virtio_early_enable_vqs(struct virtio_device *dev) > +{ > + unsigned status = dev->config->get_status(dev); > + > + BUG_ON(status & VIRTIO_CONFIG_S_DRIVER_OK); > + dev->config->set_status(dev, status | VIRTIO_CONFIG_S_DRIVER_OK); > +} > + Maybe virtio_enable_vqs_early() instead? > static inline > const char *virtio_bus_name(struct virtio_device *vdev) > {
2014 Oct 13
0
[PATCH v3 10/25] virtio: add API to enable VQs early
...> Add API for drivers to call before using VQs. > > Sets DRIVER_OK internally. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > Reviewed-by: Cornelia Huck <cornelia.huck at de.ibm.com> OK, this all looks good, but I think we should do two things: 1) rename virtio_enable_vqs_early() to virtio_device_ready(). 2) Add a BUG_ON in the virtio_ring code to make sure device is ready before any ops are called. Cheers, Rusty.
2014 Oct 05
28
[PATCH 00/16] virtio: fix spec compliance issues
Rusty, I have a mind to send this patches for the next merge window. Any input on this? This fixes the following virtio spec compliance issues: 1. on restore, drivers use device before setting ACKNOWLEDGE and DRIVER bits 2. on probe, drivers aren't prepared to handle config interrupts arriving before probe returns 3. on probe, drivers use device before DRIVER_OK it set Note that 1 is a
2014 Oct 05
28
[PATCH 00/16] virtio: fix spec compliance issues
Rusty, I have a mind to send this patches for the next merge window. Any input on this? This fixes the following virtio spec compliance issues: 1. on restore, drivers use device before setting ACKNOWLEDGE and DRIVER bits 2. on probe, drivers aren't prepared to handle config interrupts arriving before probe returns 3. on probe, drivers use device before DRIVER_OK it set Note that 1 is a
2014 Oct 13
29
[PATCH v4 00/25] virtio: fix spec compliance issues
Changes from v4: rename virtio_enable_vqs_early() to virtio_device_ready() Note: Rusty requested we add a BUG_ON in the virtio_ring code. This can be done by a separate patch on top. Good for bisectability in case BUG_ON starts triggering :) Rusty, please review this, and consider for this merge window. This fixes the following virtio spec...
2014 Oct 13
29
[PATCH v4 00/25] virtio: fix spec compliance issues
Changes from v4: rename virtio_enable_vqs_early() to virtio_device_ready() Note: Rusty requested we add a BUG_ON in the virtio_ring code. This can be done by a separate patch on top. Good for bisectability in case BUG_ON starts triggering :) Rusty, please review this, and consider for this merge window. This fixes the following virtio spec...