search for: virtio_add_status

Displaying 20 results from an estimated 110 matches for "virtio_add_status".

2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...= vi->vdev; >> + int ret; >> + >> + virtio_config_disable(dev); >> + 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)...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...= vi->vdev; >> + int ret; >> + >> + virtio_config_disable(dev); >> + 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)...
2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...urn err; } +static int virtnet_reset(struct virtnet_info *vi) +{ + struct virtio_device *dev = vi->vdev; + int ret; + + virtio_config_disable(dev); + 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->curr_queue_pairs); + if (ret) + goto err; + + vir...
2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...urn err; } +static int virtnet_reset(struct virtnet_info *vi) +{ + struct virtio_device *dev = vi->vdev; + int ret; + + virtio_config_disable(dev); + 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->curr_queue_pairs); + if (ret) + goto err; + + vir...
2023 Apr 30
1
[RFC PATCH net 1/3] virtio: re-negotiate features if probe fails and features are blocked
...+++++++++++++++----------- include/linux/virtio.h | 3 ++ 2 files changed, 56 insertions(+), 20 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 3893dc29eb2..eaad5b6a7a9 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -167,6 +167,13 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status) } EXPORT_SYMBOL_GPL(virtio_add_status); +void virtio_block_feature(struct virtio_device *dev, unsigned int f) +{ + BUG_ON(f >= 64); + dev->blocked_features |= (1ULL << f); +} +EXPORT_SYMBOL_GPL(virtio_block_feature); + /* Do some vali...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...> >> + virtio_config_disable(dev); >> >> + 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; >> >> + >> >&gt...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...> >> + virtio_config_disable(dev); >> >> + 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; >> >> + >> >&gt...
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) >> >> >> + g...
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) >> >> >> + g...
2020 Jun 15
4
[PATCH v2 0/1] s390: virtio: let's arch choose to accept devices without IOMMU feature
An architecture protecting the guest memory against unauthorized host access may want to enforce VIRTIO I/O device protection through the use of VIRTIO_F_IOMMU_PLATFORM. Let's give a chance to the architecture to accept or not devices without VIRTIO_F_IOMMU_PLATFORM. Pierre Morel (1): s390: virtio: let arch accept devices without IOMMU feature arch/s390/mm/init.c | 6 ++++++
2017 Oct 17
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...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); > > > > > > > > +...
2018 Jul 28
3
[RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively
...gt; > --- > drivers/virtio/virtio.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index 7907ad3..6b13987 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -166,6 +166,8 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status) > } > EXPORT_SYMBOL_GPL(virtio_add_status); > > +const struct dma_map_ops virtio_direct_dma_ops; > + > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); &g...
2018 Jul 28
3
[RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively
...gt; > --- > drivers/virtio/virtio.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index 7907ad3..6b13987 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -166,6 +166,8 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status) > } > EXPORT_SYMBOL_GPL(virtio_add_status); > > +const struct dma_map_ops virtio_direct_dma_ops; > + > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); &g...
2020 Jul 07
3
[PATCH v4 1/2] virtio: let arch validate VIRTIO features
...; include/linux/virtio_config.h | 1 + > 2 files changed, 20 insertions(+) > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index a977e32a88f2..3179a8aa76f5 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -167,6 +167,21 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status) > } > EXPORT_SYMBOL_GPL(virtio_add_status); > > +/* > + * arch_needs_virtio_iommu_platform - provide arch specific hook when finalizing s/arch_needs_virtio_iommu_platform/arch_validate_virtio_features/ :) > + * featur...
2020 Jul 07
3
[PATCH v4 1/2] virtio: let arch validate VIRTIO features
...; include/linux/virtio_config.h | 1 + > 2 files changed, 20 insertions(+) > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index a977e32a88f2..3179a8aa76f5 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -167,6 +167,21 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status) > } > EXPORT_SYMBOL_GPL(virtio_add_status); > > +/* > + * arch_needs_virtio_iommu_platform - provide arch specific hook when finalizing s/arch_needs_virtio_iommu_platform/arch_validate_virtio_features/ :) > + * featur...
2020 Jun 29
3
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...} > + > /* protected virtualization */ > static void pv_init(void) > { > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index a977e32a88f2..aa8e01104f86 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -167,6 +167,21 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status) > } > EXPORT_SYMBOL_GPL(virtio_add_status); > > +/* > + * arch_needs_virtio_iommu_platform - provide arch specific hook when finalizing > + * features for VIRTIO device dev > + * @dev: the VIRTIO device being added &g...
2020 Jun 29
3
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...} > + > /* protected virtualization */ > static void pv_init(void) > { > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index a977e32a88f2..aa8e01104f86 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -167,6 +167,21 @@ void virtio_add_status(struct virtio_device *dev, unsigned int status) > } > EXPORT_SYMBOL_GPL(virtio_add_status); > > +/* > + * arch_needs_virtio_iommu_platform - provide arch specific hook when finalizing > + * features for VIRTIO device dev > + * @dev: the VIRTIO device being added &g...
2019 Nov 22
2
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...vi); +} + +static int _virtnet_reset(struct virtnet_info *vi) +{ + struct virtio_device *vdev = vi->vdev; + int ret; + + virtio_config_disable(vdev); + vdev->failed = vdev->config->get_status(vdev) & VIRTIO_CONFIG_S_FAILED; + + virtnet_freeze_down(vdev); + _remove_vq_common(vi); + + virtio_add_status(vdev, VIRTIO_CONFIG_S_ACKNOWLEDGE); + virtio_add_status(vdev, VIRTIO_CONFIG_S_DRIVER); + + ret = virtio_finalize_features(vdev); + if (ret) + goto err; + + ret = virtnet_restore_up(vdev); + if (ret) + goto err; + + ret = _virtnet_set_queues(vi, vi->curr_queue_pairs); + if (ret) + goto err; +...
2019 Nov 22
2
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...vi); +} + +static int _virtnet_reset(struct virtnet_info *vi) +{ + struct virtio_device *vdev = vi->vdev; + int ret; + + virtio_config_disable(vdev); + vdev->failed = vdev->config->get_status(vdev) & VIRTIO_CONFIG_S_FAILED; + + virtnet_freeze_down(vdev); + _remove_vq_common(vi); + + virtio_add_status(vdev, VIRTIO_CONFIG_S_ACKNOWLEDGE); + virtio_add_status(vdev, VIRTIO_CONFIG_S_DRIVER); + + ret = virtio_finalize_features(vdev); + if (ret) + goto err; + + ret = virtnet_restore_up(vdev); + if (ret) + goto err; + + ret = _virtnet_set_queues(vi, vi->curr_queue_pairs); + if (ret) + goto err; +...
2020 Jun 17
6
[PATCH v3 0/1] s390: virtio: let arch choose to accept devices without IOMMU feature
An architecture protecting the guest memory against unauthorized host access may want to enforce VIRTIO I/O device protection through the use of VIRTIO_F_IOMMU_PLATFORM. Let's give a chance to the architecture to accept or not devices without VIRTIO_F_IOMMU_PLATFORM. Pierre Morel (1): s390: virtio: let arch accept devices without IOMMU feature arch/s390/mm/init.c | 6 ++++++