[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151028021530.GC18467@suse.de>
Date: Wed, 28 Oct 2015 11:15:30 +0900
From: Joerg Roedel <jroedel@...e.de>
To: Andy Lutomirski <luto@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Christian Borntraeger <borntraeger@...ibm.com>,
Cornelia Huck <cornelia.huck@...ibm.com>,
Sebastian Ott <sebott@...ux.vnet.ibm.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Christoph Hellwig <hch@....de>, benh@...nel.crashing.org,
KVM <kvm@...r.kernel.org>, dwmw2@...radead.org,
Martin Schwidefsky <schwidefsky@...ibm.com>,
linux-s390 <linux-s390@...r.kernel.org>,
Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH 3/3] virtio_pci: Use the DMA API
On Tue, Oct 27, 2015 at 06:17:10PM -0700, Andy Lutomirski wrote:
> From: Andy Lutomirski <luto@...capital.net>
>
> This fixes virtio-pci on platforms and busses that have IOMMUs. This
> will break the experimental QEMU Q35 IOMMU support until QEMU is
> fixed. In exchange, it fixes physical virtio hardware as well as
> virtio-pci running under Xen.
>
> We should clean up the virtqueue API to do its own allocation and
> teach virtqueue_get_avail and virtqueue_get_used to return DMA
> addresses directly.
>
> Signed-off-by: Andy Lutomirski <luto@...nel.org>
> ---
> drivers/virtio/virtio_pci_common.h | 3 ++-
> drivers/virtio/virtio_pci_legacy.c | 19 +++++++++++++++----
> drivers/virtio/virtio_pci_modern.c | 34 ++++++++++++++++++++++++----------
> 3 files changed, 41 insertions(+), 15 deletions(-)
Same here, you need to call the dma_sync* functions when passing data
from/to the virtio-device.
I think a good test for that is to boot a virtio kvm-guest with
swiotlb=force and see if it still works.
Joerg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists