Skip to content

Commit

Permalink
virtio_balloon: disable VIOMMU support
Browse files Browse the repository at this point in the history
virtio balloon bypasses the DMA API entirely so does not support the
VIOMMU right now.  It's not clear we need that support, for now let's
just make sure we don't pretend to support it.

Cc: [email protected]
Cc: Wei Wang <[email protected]>
Fixes: 1a93769 ("virtio: new feature to detect IOMMU device quirk")
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Jason Wang <[email protected]>
  • Loading branch information
mstsirkin committed Jun 18, 2017
1 parent 32c1431 commit e41b135
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/virtio/virtio_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,12 @@ static int virtballoon_restore(struct virtio_device *vdev)
}
#endif

static int virtballoon_validate(struct virtio_device *vdev)
{
__virtio_clear_bit(vdev, VIRTIO_F_IOMMU_PLATFORM);
return 0;
}

static unsigned int features[] = {
VIRTIO_BALLOON_F_MUST_TELL_HOST,
VIRTIO_BALLOON_F_STATS_VQ,
Expand All @@ -675,6 +681,7 @@ static struct virtio_driver virtio_balloon_driver = {
.driver.name = KBUILD_MODNAME,
.driver.owner = THIS_MODULE,
.id_table = id_table,
.validate = virtballoon_validate,
.probe = virtballoon_probe,
.remove = virtballoon_remove,
.config_changed = virtballoon_changed,
Expand Down

0 comments on commit e41b135

Please sign in to comment.