search for: virtio_finalize_features

Displaying 20 results from an estimated 138 matches for "virtio_finalize_features".

2020 Jun 16
2
[PATCH v2 1/1] s390: virtio: let arch accept devices without IOMMU feature
On Tue, 16 Jun 2020 12:52:50 +0200 Pierre Morel <pmorel at linux.ibm.com> wrote: > >> int virtio_finalize_features(struct virtio_device *dev) > >> { > >> int ret = dev->config->finalize_features(dev); > >> @@ -179,6 +184,10 @@ int virtio_finalize_features(struct virtio_device *dev) > >> if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > >> return 0...
2020 Jun 16
2
[PATCH v2 1/1] s390: virtio: let arch accept devices without IOMMU feature
On Tue, 16 Jun 2020 12:52:50 +0200 Pierre Morel <pmorel at linux.ibm.com> wrote: > >> int virtio_finalize_features(struct virtio_device *dev) > >> { > >> int ret = dev->config->finalize_features(dev); > >> @@ -179,6 +184,10 @@ int virtio_finalize_features(struct virtio_device *dev) > >> if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > >> return 0...
2018 Jul 28
3
[RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively
...0644 > --- 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); > @@ -174,6 +176,9 @@ int virtio_finalize_features(struct virtio_device *dev) > if (ret) > return ret; The previous patch removed the code block for XEN guests which forced the use of DMA...
2018 Jul 28
3
[RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively
...0644 > --- 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); > @@ -174,6 +176,9 @@ int virtio_finalize_features(struct virtio_device *dev) > if (ret) > return ret; The previous patch removed the code block for XEN guests which forced the use of DMA...
2020 Jun 16
1
[PATCH v2 1/1] s390: virtio: let arch accept devices without IOMMU feature
On 2020-06-16 14:17, Cornelia Huck wrote: > On Tue, 16 Jun 2020 13:57:26 +0200 > Halil Pasic <pasic at linux.ibm.com> wrote: > >> On Tue, 16 Jun 2020 12:52:50 +0200 >> Pierre Morel <pmorel at linux.ibm.com> wrote: >> >>>>> int virtio_finalize_features(struct virtio_device *dev) >>>>> { >>>>> int ret = dev->config->finalize_features(dev); >>>>> @@ -179,6 +184,10 @@ int virtio_finalize_features(struct virtio_device *dev) >>>>> if (!virtio_has_feature(dev, VIRTIO_F_VERSION...
2020 Jun 15
4
[PATCH v2 0/1] s390: virtio: let's arch choose to accept devices without IOMMU feature
...t VIRTIO_F_IOMMU_PLATFORM. Pierre Morel (1): s390: virtio: let arch accept devices without IOMMU feature arch/s390/mm/init.c | 6 ++++++ drivers/virtio/virtio.c | 9 +++++++++ include/linux/virtio.h | 2 ++ 3 files changed, 17 insertions(+) -- 2.25.1 Changelog to v2: - put the test in virtio_finalize_features() (Connie) - put the test inside VIRTIO core (Jason) - pass a virtio device as parameter (Halil)
2020 Jun 16
3
[PATCH v2 1/1] s390: virtio: let arch accept devices without IOMMU feature
...vice *dev, unsigned int status) > } > EXPORT_SYMBOL_GPL(virtio_add_status); > > +int __weak arch_needs_iommu_platform(struct virtio_device *dev) > +{ > + return 0; > +} > + Adding some people that could be interested in overriding this as well to the cc list. > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); > @@ -179,6 +184,10 @@ int virtio_finalize_features(struct virtio_device *dev) > if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > return 0; > > + if (arch_needs_iommu_platform(dev...
2020 Jun 16
3
[PATCH v2 1/1] s390: virtio: let arch accept devices without IOMMU feature
...vice *dev, unsigned int status) > } > EXPORT_SYMBOL_GPL(virtio_add_status); > > +int __weak arch_needs_iommu_platform(struct virtio_device *dev) > +{ > + return 0; > +} > + Adding some people that could be interested in overriding this as well to the cc list. > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); > @@ -179,6 +184,10 @@ int virtio_finalize_features(struct virtio_device *dev) > if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > return 0; > > + if (arch_needs_iommu_platform(dev...
2020 Jun 17
6
[PATCH v3 0/1] s390: virtio: let arch choose to accept devices without IOMMU feature
...t.c | 6 ++++++ drivers/virtio/virtio.c | 22 ++++++++++++++++++++++ include/linux/virtio.h | 2 ++ 3 files changed, 30 insertions(+) -- 2.25.1 Changelog to v3: - add warning (Connie, Christian) - add comment (Connie) - change hook name (Halil, Connie) to v2: - put the test in virtio_finalize_features() (Connie) - put the test inside VIRTIO core (Jason) - pass a virtio device as parameter (Halil)
2018 Jul 30
1
[RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively
> +const struct dma_map_ops virtio_direct_dma_ops; This belongs into a header if it is non-static. If you only use it in this file anyway please mark it static and avoid a forward declaration. > + > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); > @@ -174,6 +176,9 @@ int virtio_finalize_features(struct virtio_device *dev) > if (ret) > return ret; > > + if (virtio_has_iommu_quirk(dev)) > + set_dma_ops(dev->dev.parent,...
2020 Jun 29
3
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...ic functionality when > + * devices features are finalized. This is the default implementation. > + * Architecture implementations can override this. > + */ > + > +int __weak arch_needs_virtio_iommu_platform(struct virtio_device *dev) > +{ > + return 0; > +} > + > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); > @@ -179,6 +194,13 @@ int virtio_finalize_features(struct virtio_device *dev) > if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > return 0; > > + if (arch_needs_virtio_iommu_platf...
2020 Jun 29
3
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...ic functionality when > + * devices features are finalized. This is the default implementation. > + * Architecture implementations can override this. > + */ > + > +int __weak arch_needs_virtio_iommu_platform(struct virtio_device *dev) > +{ > + return 0; > +} > + > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); > @@ -179,6 +194,13 @@ int virtio_finalize_features(struct virtio_device *dev) > if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > return 0; > > + if (arch_needs_virtio_iommu_platf...
2018 Jul 28
0
[RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively
...> > +++ 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); > > @@ -174,6 +176,9 @@ int virtio_finalize_features(struct virtio_device *dev) > > if (ret) > > return ret; > > > The previous patch removed the code block for...
2018 Jul 20
15
[RFC 0/4] Virtio uses DMA API for all devices
...irect GPA path which virtio core currently has but just wrapped in a DMA API format. Virtio core must use 'virtio_direct_dma_ops' instead of the arch default in absence of VIRTIO_F_IOMMU_PLATFORM flag to preserve the existing semantics. The second patch does exactly that inside the function virtio_finalize_features(). The third patch removes the default direct GPA path from virtio core forcing it to use DMA API callbacks for all devices. Now with that change, every device must have a DMA operations structure associated with it. The fourth patch adds an additional hook which gives the platform an opportunity t...
2018 Jul 20
15
[RFC 0/4] Virtio uses DMA API for all devices
...irect GPA path which virtio core currently has but just wrapped in a DMA API format. Virtio core must use 'virtio_direct_dma_ops' instead of the arch default in absence of VIRTIO_F_IOMMU_PLATFORM flag to preserve the existing semantics. The second patch does exactly that inside the function virtio_finalize_features(). The third patch removes the default direct GPA path from virtio core forcing it to use DMA API callbacks for all devices. Now with that change, every device must have a DMA operations structure associated with it. The fourth patch adds an additional hook which gives the platform an opportunity t...
2020 Jun 17
4
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...(AFAICT we only lack guest enablement for this) such a function could be useful. But since this can be rewritten any time, let's go with the option people already agree with, instead of more discussion. Just another question. Do we want this backported? Do we need cc stable? [..] > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); > @@ -179,6 +194,13 @@ int virtio_finalize_features(struct virtio_device *dev) > if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > return 0; > > + if (arch_needs_virtio_iommu_platf...
2020 Jun 17
4
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...(AFAICT we only lack guest enablement for this) such a function could be useful. But since this can be rewritten any time, let's go with the option people already agree with, instead of more discussion. Just another question. Do we want this backported? Do we need cc stable? [..] > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); > @@ -179,6 +194,13 @@ int virtio_finalize_features(struct virtio_device *dev) > if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > return 0; > > + if (arch_needs_virtio_iommu_platf...
2020 Jun 15
3
[PATCH] s390: protvirt: virtio: Refuse device without IOMMU
...unt >> Connie's comment on where the test should be done: >> >> - declare a weak function in virtio.c code, returning that memory >> protection is not in use. >> >> - overwrite the function in the arch code >> >> - call this function inside core virtio_finalize_features() and if >> required fail if the device don't have VIRTIO_F_IOMMU_PLATFORM. I think this is fine. >> >> Alternative could be to test a global variable that the architecture >> would overwrite if needed but I find the weak function solution more >> flexible....
2020 Jun 15
3
[PATCH] s390: protvirt: virtio: Refuse device without IOMMU
...unt >> Connie's comment on where the test should be done: >> >> - declare a weak function in virtio.c code, returning that memory >> protection is not in use. >> >> - overwrite the function in the arch code >> >> - call this function inside core virtio_finalize_features() and if >> required fail if the device don't have VIRTIO_F_IOMMU_PLATFORM. I think this is fine. >> >> Alternative could be to test a global variable that the architecture >> would overwrite if needed but I find the weak function solution more >> flexible....
2020 Jun 17
1
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...ic functionality when > + * devices features are finalized. This is the default implementation. > + * Architecture implementations can override this. > + */ > + > +int __weak arch_needs_virtio_iommu_platform(struct virtio_device *dev) > +{ > + return 0; > +} > + > int virtio_finalize_features(struct virtio_device *dev) > { > int ret = dev->config->finalize_features(dev); > @@ -179,6 +194,13 @@ int virtio_finalize_features(struct virtio_device *dev) > if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > return 0; > > + if (arch_needs_virtio_iommu_platf...