lkml.org 
[lkml]   [2020]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vhost/vsock: add IOTLB API support
On Thu, Oct 29, 2020 at 06:43:51PM +0100, Stefano Garzarella wrote:
> This patch enables the IOTLB API support for vhost-vsock devices,
> allowing the userspace to emulate an IOMMU for the guest.
>
> These changes were made following vhost-net, in details this patch:
> - exposes VIRTIO_F_ACCESS_PLATFORM feature and inits the iotlb
> device if the feature is acked
> - implements VHOST_GET_BACKEND_FEATURES and
> VHOST_SET_BACKEND_FEATURES ioctls
> - calls vq_meta_prefetch() before vq processing to prefetch vq
> metadata address in IOTLB
> - provides .read_iter, .write_iter, and .poll callbacks for the
> chardev; they are used by the userspace to exchange IOTLB messages
>
> This patch was tested with QEMU and a patch applied [1] to fix a
> simple issue:
> $ qemu -M q35,accel=kvm,kernel-irqchip=split \
> -drive file=fedora.qcow2,format=qcow2,if=virtio \
> -device intel-iommu,intremap=on \
> -device vhost-vsock-pci,guest-cid=3,iommu_platform=on
>
> [1] https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg09077.html
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
> drivers/vhost/vsock.c | 68 +++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 65 insertions(+), 3 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-10-30 10:12    [W:0.127 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site