Displaying 20 results from an estimated 203 matches for "virtio_config_s_driv".
Did you mean:
virtio_config_s_driver
2007 Dec 21
1
[kvm-devel] [Virtio-for-kvm] [PATCH 13/13] [Mostly resend] virtio additions
From 9f5a551d7e2a00eb019b158f8f3130e8176ec27c Mon Sep 17 00:00:00 2001
From: Dor Laor <dor.laor@qumranet.com>
Date: Mon, 17 Dec 2007 01:40:15 +0200
Subject: [PATCH] Update all status fields on driver unload
Both VIRTIO_CONFIG_S_DRIVER and VIRTIO_CONFIG_S_DRIVER_OK should
be cleaned upon driver unload.
Signed-off-by: Dor Laor <dor.laor@qumranet.com>
---
drivers/virtio/virtio.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 212f4e3..05d5f...
2007 Dec 21
1
[kvm-devel] [Virtio-for-kvm] [PATCH 13/13] [Mostly resend] virtio additions
From 9f5a551d7e2a00eb019b158f8f3130e8176ec27c Mon Sep 17 00:00:00 2001
From: Dor Laor <dor.laor@qumranet.com>
Date: Mon, 17 Dec 2007 01:40:15 +0200
Subject: [PATCH] Update all status fields on driver unload
Both VIRTIO_CONFIG_S_DRIVER and VIRTIO_CONFIG_S_DRIVER_OK should
be cleaned upon driver unload.
Signed-off-by: Dor Laor <dor.laor@qumranet.com>
---
drivers/virtio/virtio.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 212f4e3..05d5f...
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
2014 Nov 13
2
[PATCH 1/2] virito: introduce methods of fixing device features
...irtio_disable_feature(struct virtio_device *vdev,
>> + unsigned int fbit)
>> +{
>> + BUG_ON(fbit >= VIRTIO_TRANSPORT_F_START);
>> + BUG_ON(vdev->config->get_status(vdev) &
>> + ~(VIRTIO_CONFIG_S_ACKNOWLEDGE | VIRTIO_CONFIG_S_DRIVER));
> When we add virtio-1 support, we can add a check for FEATURES_OK here,
> so we're really on the safe side.
>
If I read the spec correctly, FEATURES_OK was set only after writing the
features bits to device. But we want to sanitize the them before.
>> +
>> + virtio_c...
2014 Nov 13
2
[PATCH 1/2] virito: introduce methods of fixing device features
...irtio_disable_feature(struct virtio_device *vdev,
>> + unsigned int fbit)
>> +{
>> + BUG_ON(fbit >= VIRTIO_TRANSPORT_F_START);
>> + BUG_ON(vdev->config->get_status(vdev) &
>> + ~(VIRTIO_CONFIG_S_ACKNOWLEDGE | VIRTIO_CONFIG_S_DRIVER));
> When we add virtio-1 support, we can add a check for FEATURES_OK here,
> so we're really on the safe side.
>
If I read the spec correctly, FEATURES_OK was set only after writing the
features bits to device. But we want to sanitize the them before.
>> +
>> + virtio_c...
2023 Apr 30
1
[RFC PATCH net 1/3] virtio: re-negotiate features if probe fails and features are blocked
...ate_features(struct virtio_device *dev)
{
- int err, i;
- struct virtio_device *dev = dev_to_virtio(_d);
struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
u64 device_features;
u64 driver_features;
u64 driver_features_legacy;
-
- /* We have a driver! */
- virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
+ int i, ret;
/* Figure out what features the device supports. */
device_features = dev->config->get_features(dev);
@@ -279,30 +282,61 @@ static int virtio_dev_probe(struct device *_d)
if (device_features & (1ULL << i))
__virtio_set_bit(dev, i);
- err = dev->co...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...;
>> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
>> + virtnet_freeze_down(dev, true);
>> + remove_vq_common(vi);
>> +
>> + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>> + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> +
>> + ret = virtio_finalize_features(dev);
>> + if (ret)
>> + goto err;
>> +
>> + ret = virtnet_restore_up(dev);
>> + if (ret)
>> + goto err;
>> +
>> + ret = virtnet_set_queues(vi, vi->...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...;
>> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
>> + virtnet_freeze_down(dev, true);
>> + remove_vq_common(vi);
>> +
>> + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
>> + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> +
>> + ret = virtio_finalize_features(dev);
>> + if (ret)
>> + goto err;
>> +
>> + ret = virtnet_restore_up(dev);
>> + if (ret)
>> + goto err;
>> +
>> + ret = virtnet_set_queues(vi, vi->...
2014 Sep 23
5
[PATCH RFC] virtio_pci: fix virtio spec compliance on restore
...p;vp_dev->vdev, status);
+
+ /* Maybe driver failed before freeze.
+ * Restore the failed status, for debugging. */
+ status |= vp_dev->saved_status & VIRTIO_CONFIG_S_FAILED;
+ vp_set_status(&vp_dev->vdev, status);
+
+ if (!drv)
+ return 0;
+
+ /* We have a driver! */
+ status |= VIRTIO_CONFIG_S_DRIVER;
+ vp_set_status(&vp_dev->vdev, status);
+
vp_finalize_features(&vp_dev->vdev);
- if (drv && drv->restore)
- ret = drv->restore(&vp_dev->vdev);
+ if (!drv->restore)
+ return 0;
+
+ ret = drv->restore(&vp_dev->vdev);
+ if (ret) {
+ status |= V...
2014 Sep 23
5
[PATCH RFC] virtio_pci: fix virtio spec compliance on restore
...p;vp_dev->vdev, status);
+
+ /* Maybe driver failed before freeze.
+ * Restore the failed status, for debugging. */
+ status |= vp_dev->saved_status & VIRTIO_CONFIG_S_FAILED;
+ vp_set_status(&vp_dev->vdev, status);
+
+ if (!drv)
+ return 0;
+
+ /* We have a driver! */
+ status |= VIRTIO_CONFIG_S_DRIVER;
+ vp_set_status(&vp_dev->vdev, status);
+
vp_finalize_features(&vp_dev->vdev);
- if (drv && drv->restore)
- ret = drv->restore(&vp_dev->vdev);
+ if (!drv->restore)
+ return 0;
+
+ ret = drv->restore(&vp_dev->vdev);
+ if (ret) {
+ status |= V...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...L(VIRTIO_F_VERSION_1) | BIT_ULL(VIRTIO_F_ACCESS_PLATFORM) | \
+ BIT_ULL(VIRTIO_F_RING_PACKED) | BIT_ULL(VIRTIO_F_ORDER_PLATFORM) | BIT_ULL(VIRTIO_F_SR_IOV))
#define VALID_STATUS_MASK \
(VIRTIO_CONFIG_S_ACKNOWLEDGE | VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK | \
@@ -149,7 +149,7 @@ static bool mlx5_vdpa_debug;
#define MLX5_LOG_VIO_FLAG(_feature) \
do { \
- if (fea...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...L(VIRTIO_F_VERSION_1) | BIT_ULL(VIRTIO_F_ACCESS_PLATFORM) | \
+ BIT_ULL(VIRTIO_F_RING_PACKED) | BIT_ULL(VIRTIO_F_ORDER_PLATFORM) | BIT_ULL(VIRTIO_F_SR_IOV))
#define VALID_STATUS_MASK \
(VIRTIO_CONFIG_S_ACKNOWLEDGE | VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK | \
@@ -149,7 +149,7 @@ static bool mlx5_vdpa_debug;
#define MLX5_LOG_VIO_FLAG(_feature) \
do { \
- if (fea...
2017 Mar 29
1
[PATCH net-next] virtio_net: don't reset twice on XDP on/off
...t.c
+++ b/drivers/net/virtio_net.c
@@ -1810,7 +1810,6 @@ static int virtnet_reset(struct virtnet_info *vi, int curr_qp, int xdp_qp)
virtnet_freeze_down(dev);
_remove_vq_common(vi);
- dev->config->reset(dev);
virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
--
MST
2017 Mar 29
1
[PATCH net-next] virtio_net: don't reset twice on XDP on/off
...t.c
+++ b/drivers/net/virtio_net.c
@@ -1810,7 +1810,6 @@ static int virtnet_reset(struct virtnet_info *vi, int curr_qp, int xdp_qp)
virtnet_freeze_down(dev);
_remove_vq_common(vi);
- dev->config->reset(dev);
virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
--
MST
2014 Oct 22
0
[PATCH RFC v2 09/16] virtio: set FEATURES_OK
...++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index f3fe33a..a6d0cde 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -38,6 +38,8 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
+/* Driver has finished configuring features */
+#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
diff --git a/drivers/virtio...
2014 Oct 23
0
[PATCH RFC v4 09/17] virtio: set FEATURES_OK
...++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index f3fe33a..a6d0cde 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -38,6 +38,8 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
+/* Driver has finished configuring features */
+#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
diff --git a/drivers/virtio...
2014 Nov 24
0
[PATCH v3 08/41] virtio: set FEATURES_OK
...++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index f3fe33a..a6d0cde 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -38,6 +38,8 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
+/* Driver has finished configuring features */
+#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
diff --git a/drivers/virtio...
2014 Nov 27
0
[PATCH v5 11/45] virtio: set FEATURES_OK
...++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index 80e7381..4d05671 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -38,6 +38,8 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
+/* Driver has finished configuring features */
+#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
diff --git a/drivers/virtio...
2014 Nov 27
0
[PATCH v6 12/46] virtio: set FEATURES_OK
...++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index 80e7381..4d05671 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -38,6 +38,8 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
+/* Driver has finished configuring features */
+#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
diff --git a/drivers/virtio...