Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1665085 > unrolled thread

[PATCH] virtio_balloon: disable VIOMMU support

Started by"Michael S. Tsirkin" <mst@redhat.com>
First post2017-06-13 20:10 +0200
Last post2017-06-15 11:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] virtio_balloon: disable VIOMMU support "Michael S. Tsirkin" <mst@redhat.com> - 2017-06-13 20:10 +0200
    Re: [PATCH] virtio_balloon: disable VIOMMU support Jason Wang <jasowang@redhat.com> - 2017-06-15 11:20 +0200

#1665085 — [PATCH] virtio_balloon: disable VIOMMU support

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-06-13 20:10 +0200
Subject[PATCH] virtio_balloon: disable VIOMMU support
Message-ID<tRYqm-2Pr-5@gated-at.bofh.it>
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: stable@vger.kernel.org
Cc: Wei Wang <wei.w.wang@intel.com>
Fixes: 1a937693993f ("virtio: new feature to detect IOMMU device quirk")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 drivers/virtio/virtio_balloon.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 408c174..22caf80 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -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,
@@ -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,
-- 
MST

[toc] | [next] | [standalone]


#1666590

FromJason Wang <jasowang@redhat.com>
Date2017-06-15 11:20 +0200
Message-ID<tSz6x-C2-3@gated-at.bofh.it>
In reply to#1665085

On 2017年06月14日 02:00, Michael S. Tsirkin wrote:
> 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: stable@vger.kernel.org
> Cc: Wei Wang <wei.w.wang@intel.com>
> Fixes: 1a937693993f ("virtio: new feature to detect IOMMU device quirk")
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   drivers/virtio/virtio_balloon.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 408c174..22caf80 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -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,
> @@ -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,

Acked-by: Jason Wang <jasowang@redhat.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web