search for: vring_arm_legacy_dma_quirk

Displaying 2 results from an estimated 2 matches for "vring_arm_legacy_dma_quirk".

2017 Feb 02
3
[PATCH v2 1/2] virtio: Make ARM SMMU workaround more specific
...+ * virtio block devices, which can be placed behind a "real" IOMMU, but are + * unaware of VIRTIO_F_IOMMU_PLATFORM. Fortunately, we can detect whether + * an IOMMU is present and in use by checking whether an IOMMU driver has + * assigned the DMA master device a group. + */ +static bool vring_arm_legacy_dma_quirk(struct virtio_device *vdev) +{ + struct iommu_group *group; + + if (!(IS_ENABLED(CONFIG_ARM) || IS_ENABLED(CONFIG_ARM64)) || + virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) + return false; + + group = iommu_group_get(vdev->dev.parent); + iommu_group_put(group); + + return group != NULL; +}...
2017 Feb 02
3
[PATCH v2 1/2] virtio: Make ARM SMMU workaround more specific
...+ * virtio block devices, which can be placed behind a "real" IOMMU, but are + * unaware of VIRTIO_F_IOMMU_PLATFORM. Fortunately, we can detect whether + * an IOMMU is present and in use by checking whether an IOMMU driver has + * assigned the DMA master device a group. + */ +static bool vring_arm_legacy_dma_quirk(struct virtio_device *vdev) +{ + struct iommu_group *group; + + if (!(IS_ENABLED(CONFIG_ARM) || IS_ENABLED(CONFIG_ARM64)) || + virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) + return false; + + group = iommu_group_get(vdev->dev.parent); + iommu_group_put(group); + + return group != NULL; +}...