aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux/vhost.h
AgeCommit message (Collapse)AuthorFilesLines
2016-12-16vhost: remove unused feature bitJason Wang1-2/+0
Signed-off-by: Jason Wang <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
2016-08-02vhost: new device IOTLB APIJason Wang1-0/+28
This patch tries to implement an device IOTLB for vhost. This could be used with userspace(qemu) implementation of DMA remapping to emulate an IOMMU for the guest. The idea is simple, cache the translation in a software device IOTLB (which is implemented as an interval tree) in vhost and use vhost_net file descriptor for reporting IOTLB miss and IOTLB update/invalidation. When vhost meets an IOTLB miss, the fault address, size and access can be read from the file. After userspace finishes the translation, it writes the translated address to the vhost_net file to update the device IOTLB. When device IOTLB is enabled by setting VIRTIO_F_IOMMU_PLATFORM all vq addresses set by ioctl are treated as iova instead of virtual address and the accessing can only be done through IOTLB instead of direct userspace memory access. Before each round or vq processing, all vq metadata is prefetched in device IOTLB to make sure no translation fault happens during vq processing. In most cases, virtqueues are contiguous even in virtual address space. The IOTLB translation for virtqueue itself may make it a little slower. We might add fast path cache on top of this patch. Signed-off-by: Jason Wang <[email protected]> [mst: use virtio feature bit: VHOST_F_DEVICE_IOTLB -> VIRTIO_F_IOMMU_PLATFORM ] [mst: fix build warnings ] Signed-off-by: Michael S. Tsirkin <[email protected]> [ weiyj.lk: missing unlock on error ] Signed-off-by: Wei Yongjun <[email protected]>
2016-08-02VSOCK: Introduce vhost_vsock.koAsias He1-0/+5
VM sockets vhost transport implementation. This driver runs on the host. Signed-off-by: Asias He <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
2016-03-11vhost_net: basic polling supportJason Wang1-0/+6
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
2015-06-01vhost: cross-endian support for legacy devicesGreg Kurz1-0/+14
This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare situation, the feature availability is controlled by a kernel config option (not set by default). The vq->is_le boolean field is added to cache the endianness to be used for ring accesses. It defaults to native endian, as expected by legacy virtio devices. When the ring gets active, we force little endian if the device is modern. When the ring is deactivated, we revert to the native endian default. If cross-endian was compiled in, a vq->user_be boolean field is added so that userspace may request a specific endianness. This field is used to override the default when activating the ring of a legacy device. It has no effect on modern devices. Signed-off-by: Greg Kurz <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Reviewed-by: David Gibson <[email protected]>
2013-05-02tcm_vhost: header split upMichael S. Tsirkin1-0/+28
move uapi parts to vhost.h move .c private parts to .c itself Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Asias He <[email protected]> Acked-by: Nicholas Bellinger <[email protected]>
2012-10-13UAPI: (Scripted) Disintegrate include/linuxDavid Howells1-0/+130
Signed-off-by: David Howells <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Michael Kerrisk <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Dave Jones <[email protected]>