diff options
author | 2020-04-01 12:46:22 -0400 | |
---|---|---|
committer | 2020-04-16 18:31:08 -0400 | |
commit | 3302363a27fb38a3581921a74aff855f4dcbfe0a (patch) | |
tree | 5facda6624c9bf93dee6434c89dc3352e89e0d96 /drivers/vhost/vringh.c | |
parent | vhost: Create accessors for virtqueues private_data (diff) | |
download | linux-3302363a27fb38a3581921a74aff855f4dcbfe0a.tar.gz linux-3302363a27fb38a3581921a74aff855f4dcbfe0a.tar.bz2 linux-3302363a27fb38a3581921a74aff855f4dcbfe0a.zip |
virtio/test: fix up after IOTLB changes
Allow building vringh without IOTLB (that's the case for userspace
builds, will be useful for CAIF/VOD down the road too).
Update for API tweaks.
Don't include vringh with userspace builds.
Cc: Jason Wang <jasowang@redhat.com>
Cc: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/vhost/vringh.c')
-rw-r--r-- | drivers/vhost/vringh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c index ee0491f579ac..ba8e0d6cfd97 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -13,9 +13,11 @@ #include <linux/uaccess.h> #include <linux/slab.h> #include <linux/export.h> +#if IS_REACHABLE(CONFIG_VHOST_IOTLB) #include <linux/bvec.h> #include <linux/highmem.h> #include <linux/vhost_iotlb.h> +#endif #include <uapi/linux/virtio_config.h> static __printf(1,2) __cold void vringh_bad(const char *fmt, ...) @@ -1059,6 +1061,8 @@ int vringh_need_notify_kern(struct vringh *vrh) } EXPORT_SYMBOL(vringh_need_notify_kern); +#if IS_REACHABLE(CONFIG_VHOST_IOTLB) + static int iotlb_translate(const struct vringh *vrh, u64 addr, u64 len, struct bio_vec iov[], int iov_size, u32 perm) @@ -1416,5 +1420,6 @@ int vringh_need_notify_iotlb(struct vringh *vrh) } EXPORT_SYMBOL(vringh_need_notify_iotlb); +#endif MODULE_LICENSE("GPL"); |