We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6c99c3 commit 7a47169Copy full SHA for 7a47169
hw/virtio/vhost.c
@@ -810,6 +810,11 @@ static int vhost_dev_set_features(struct vhost_dev *dev,
810
if (!vhost_dev_has_iommu(dev)) {
811
features &= ~(0x1ULL << VIRTIO_F_IOMMU_PLATFORM);
812
}
813
+ if (dev->vhost_ops->vhost_force_iommu) {
814
+ if (dev->vhost_ops->vhost_force_iommu(dev) == true) {
815
+ features |= 0x1ULL << VIRTIO_F_IOMMU_PLATFORM;
816
+ }
817
818
r = dev->vhost_ops->vhost_set_features(dev, features);
819
if (r < 0) {
820
VHOST_OPS_DEBUG("vhost_set_features failed");
0 commit comments