search for: virtio_config_s_driver_ok

Displaying 20 results from an estimated 367 matches for "virtio_config_s_driver_ok".

2012 Jul 06
2
[PATCH] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
From: Nicholas Bellinger <nab at linux-iscsi.org> This patch changes virtio-scsi to use a new virtio_driver->scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of from within virtscsi_probe(). This fixes a bug where SCSI LUN scanning for both virtio-scsi-raw and virtio-scsi/tcm_vhost setups was happening before VIRTIO_CONFIG_S_DRIVER_OK had been set, causing VIRTIO_SCSI_S_BAD_TARGET to occur. This fixes a...
2012 Jul 06
2
[PATCH] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
From: Nicholas Bellinger <nab at linux-iscsi.org> This patch changes virtio-scsi to use a new virtio_driver->scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of from within virtscsi_probe(). This fixes a bug where SCSI LUN scanning for both virtio-scsi-raw and virtio-scsi/tcm_vhost setups was happening before VIRTIO_CONFIG_S_DRIVER_OK had been set, causing VIRTIO_SCSI_S_BAD_TARGET to occur. This fixes a...
2012 Jul 11
2
[PATCH-v2] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
From: Nicholas Bellinger <nab at linux-iscsi.org> This patch changes virtio-scsi to use a new virtio_driver->scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of from within virtscsi_probe(). This fixes a bug where SCSI LUN scanning for both virtio-scsi-raw and virtio-scsi/tcm_vhost setups was happening before VIRTIO_CONFIG_S_DRIVER_OK had been set, causing VIRTIO_SCSI_S_BAD_TARGET to occur. This fixes a...
2012 Jul 11
2
[PATCH-v2] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
From: Nicholas Bellinger <nab at linux-iscsi.org> This patch changes virtio-scsi to use a new virtio_driver->scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of from within virtscsi_probe(). This fixes a bug where SCSI LUN scanning for both virtio-scsi-raw and virtio-scsi/tcm_vhost setups was happening before VIRTIO_CONFIG_S_DRIVER_OK had been set, causing VIRTIO_SCSI_S_BAD_TARGET to occur. This fixes a...
2020 Sep 09
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
----- Original Message ----- > On Mon, Sep 07, 2020 at 06:53:23AM -0400, Jason Wang wrote: > > > > > > ----- Original Message ----- > > > If the memory map changes before the driver status is > > > VIRTIO_CONFIG_S_DRIVER_OK, don't attempt to create resources because it > > > may fail. For example, if the VQ is not ready there is no point in > > > creating resources. > > > > > > Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 > > > devices"...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...gt;> ? ????? if (status == 0) { >>> ????????? ifcvf_stop_datapath(adapter); >>> @@ -128,7 +185,22 @@ static void ifcvf_vdpa_set_status(struct >>> vdpa_device *vdpa_dev, u8 status) >>> ????????? return; >>> ????? } >>> ? -??? if (status & VIRTIO_CONFIG_S_DRIVER_OK) { >>> +??? if ((status_old & VIRTIO_CONFIG_S_DRIVER_OK) && >>> +??????? !(status & VIRTIO_CONFIG_S_DRIVER_OK)) { >>> +??????? ifcvf_stop_datapath(adapter); >>> +??????? ifcvf_free_irq(adapter, IFCVF_MAX_QUEUE_PAIRS * 2); >>> +??? } >&...
2020 Sep 07
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
----- Original Message ----- > If the memory map changes before the driver status is > VIRTIO_CONFIG_S_DRIVER_OK, don't attempt to create resources because it > may fail. For example, if the VQ is not ready there is no point in > creating resources. > > Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") > Signed-off-by: Eli Cohen <elic at nvidia.com&...
2020 Sep 07
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
On Mon, Sep 07, 2020 at 10:51:36AM +0300, Eli Cohen wrote: > If the memory map changes before the driver status is > VIRTIO_CONFIG_S_DRIVER_OK, don't attempt to create resources because it > may fail. For example, if the VQ is not ready there is no point in > creating resources. > > Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") > Signed-off-by: Eli Cohen <elic at nvidia.com&...
2020 Sep 08
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
On Mon, Sep 07, 2020 at 02:43:51PM +0300, Eli Cohen wrote: > On Mon, Sep 07, 2020 at 07:34:00AM -0400, Michael S. Tsirkin wrote: > > On Mon, Sep 07, 2020 at 10:51:36AM +0300, Eli Cohen wrote: > > > If the memory map changes before the driver status is > > > VIRTIO_CONFIG_S_DRIVER_OK, don't attempt to create resources because it > > > may fail. For example, if the VQ is not ready there is no point in > > > creating resources. > > > > > > Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") > > &gt...
2015 Feb 13
0
[PATCH] virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
...at rustcorp.com.au> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index b9f70dfc4751..5ce2aa48fc6e 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -236,7 +236,10 @@ static int virtio_dev_probe(struct device *_d) if (err) goto err; - add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); + /* If probe didn't do it, mark device DRIVER_OK ourselves. */ + if (!(dev->config->get_status(dev) & VIRTIO_CONFIG_S_DRIVER_OK)) + virtio_device_ready(dev); + if (drv->scan) drv->scan(dev);
2015 Feb 13
0
[PATCH] virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
...at rustcorp.com.au> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index b9f70dfc4751..5ce2aa48fc6e 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -236,7 +236,10 @@ static int virtio_dev_probe(struct device *_d) if (err) goto err; - add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); + /* If probe didn't do it, mark device DRIVER_OK ourselves. */ + if (!(dev->config->get_status(dev) & VIRTIO_CONFIG_S_DRIVER_OK)) + virtio_device_ready(dev); + if (drv->scan) drv->scan(dev);
2020 Sep 09
0
[PATCH v2] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...0aab 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -1645,6 +1645,9 @@ static int mlx5_vdpa_change_map(struct mlx5_vdpa_net > *ndev, struct vhost_iotlb * > if (err) > goto err_mr; > > + if (!(ndev->mvdev.status & VIRTIO_CONFIG_S_DRIVER_OK)) > + return 0; > + Is there any reason that we still need to do vq suspending and saving before? Thanks > restore_channels_info(ndev); > err = setup_driver(ndev); > if (err) > -- > 2.26.0 > >
2013 Mar 15
7
[PATCH 0/2] Fix booting tcm_vhost + seabios
Asias He (2): virtio-scsi: Set _DRIVER_OK flag before scsi target scanning virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} src/virtio-scsi.c | 5 +++-- src/virtio-scsi.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) -- 1.8.1.4
2013 Mar 15
7
[PATCH 0/2] Fix booting tcm_vhost + seabios
Asias He (2): virtio-scsi: Set _DRIVER_OK flag before scsi target scanning virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} src/virtio-scsi.c | 5 +++-- src/virtio-scsi.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) -- 1.8.1.4
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...ifcvf_adapter *adapter; > struct ifcvf_hw *vf; > + u8 status_old; > + int ret; > > vf = vdpa_to_vf(vdpa_dev); > adapter = dev_get_drvdata(vdpa_dev->dev.parent); > + status_old = ifcvf_get_status(vf); > > - if (status == 0) { > + if ((status_old & VIRTIO_CONFIG_S_DRIVER_OK) && > + !(status & VIRTIO_CONFIG_S_DRIVER_OK)) { > ifcvf_stop_datapath(adapter); > + ifcvf_free_irq(adapter, IFCVF_MAX_QUEUE_PAIRS * 2); > + } > + > + if (status == 0) { > ifcvf_reset_vring(adapter); > return; > } > > - if (status...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...pa_dev->dev.parent); > + status_old = ifcvf_get_status(vf); > > if (status == 0) { > ifcvf_stop_datapath(adapter); > @@ -128,7 +185,22 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) > return; > } > > - if (status & VIRTIO_CONFIG_S_DRIVER_OK) { > + if ((status_old & VIRTIO_CONFIG_S_DRIVER_OK) && > + !(status & VIRTIO_CONFIG_S_DRIVER_OK)) { > + ifcvf_stop_datapath(adapter); > + ifcvf_free_irq(adapter, IFCVF_MAX_QUEUE_PAIRS * 2); > + } > + > + if ((status & VIRTIO_CONFIG_S_DRIVER_OK) &&a...
2014 Oct 06
1
[PATCH 10/16] virtio: add API to enable VQs early
...se vqs in the probe function. > + * > + * Note: vqs are enabled automatically after probe returns. > + */ > +static inline > +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
...se vqs in the probe function. > + * > + * Note: vqs are enabled automatically after probe returns. > + */ > +static inline > +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) > {
2012 Dec 18
1
[Qemu-devel] [PATCH v6 12/12] virtio-blk: add x-data-plane=on|off performance feature
...ec 18, 2012 at 03:57:17PM +0100, Stefan Hajnoczi wrote: > > > @@ -407,6 +409,14 @@ static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq) > > > .num_writes = 0, > > > }; > > > > > > + /* Some guests kick before setting VIRTIO_CONFIG_S_DRIVER_OK so start > > > + * dataplane here instead of waiting for .set_status(). > > > + */ > > > > By the way which guests are these? > > I ran a Windows 8 guest today with build 48 virtio-win drivers. It > notifies before the device gets its .set_status()...
2012 Dec 18
1
[Qemu-devel] [PATCH v6 12/12] virtio-blk: add x-data-plane=on|off performance feature
...ec 18, 2012 at 03:57:17PM +0100, Stefan Hajnoczi wrote: > > > @@ -407,6 +409,14 @@ static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq) > > > .num_writes = 0, > > > }; > > > > > > + /* Some guests kick before setting VIRTIO_CONFIG_S_DRIVER_OK so start > > > + * dataplane here instead of waiting for .set_status(). > > > + */ > > > > By the way which guests are these? > > I ran a Windows 8 guest today with build 48 virtio-win drivers. It > notifies before the device gets its .set_status()...