Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:48382 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbdFOJQB (ORCPT ); Thu, 15 Jun 2017 05:16:01 -0400 Subject: Re: [PATCH] virtio_balloon: disable VIOMMU support To: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Wei Wang , virtualization@lists.linux-foundation.org References: <1497376825-15502-1-git-send-email-mst@redhat.com> From: Jason Wang Message-ID: <61792a09-4052-8596-fabf-f2a850dc5b18@redhat.com> Date: Thu, 15 Jun 2017 17:15:50 +0800 MIME-Version: 1.0 In-Reply-To: <1497376825-15502-1-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: stable-owner@vger.kernel.org List-ID: 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 > Fixes: 1a937693993f ("virtio: new feature to detect IOMMU device quirk") > Signed-off-by: Michael S. Tsirkin > --- > 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