diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2020-04-01 12:46:22 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-04-16 18:31:08 -0400 |
commit | 3302363a27fb38a3581921a74aff855f4dcbfe0a (patch) | |
tree | 5facda6624c9bf93dee6434c89dc3352e89e0d96 /include | |
parent | 247643f85782fc1119ccbd712a5075535ebf9d43 (diff) | |
download | linux-3302363a27fb38a3581921a74aff855f4dcbfe0a.tar.bz2 |
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 'include')
-rw-r--r-- | include/linux/vringh.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/vringh.h b/include/linux/vringh.h index bd0503ca6f8f..9e2763d7c159 100644 --- a/include/linux/vringh.h +++ b/include/linux/vringh.h @@ -14,8 +14,10 @@ #include <linux/virtio_byteorder.h> #include <linux/uio.h> #include <linux/slab.h> +#if IS_REACHABLE(CONFIG_VHOST_IOTLB) #include <linux/dma-direction.h> #include <linux/vhost_iotlb.h> +#endif #include <asm/barrier.h> /* virtio_ring with information needed for host access. */ @@ -254,6 +256,8 @@ static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val) return __cpu_to_virtio64(vringh_is_little_endian(vrh), val); } +#if IS_REACHABLE(CONFIG_VHOST_IOTLB) + void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb); int vringh_init_iotlb(struct vringh *vrh, u64 features, @@ -284,4 +288,6 @@ void vringh_notify_disable_iotlb(struct vringh *vrh); int vringh_need_notify_iotlb(struct vringh *vrh); +#endif /* CONFIG_VHOST_IOTLB */ + #endif /* _LINUX_VRINGH_H */ |