1. 02 Aug, 2016 3 commits
    • Michael S. Tsirkin's avatar
      vhost: detect 32 bit integer wrap around · ec33d031
      Michael S. Tsirkin authored
      Detect and fail early if long wrap around is triggered.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      ec33d031
    • Jason Wang's avatar
      vhost: new device IOTLB API · 6b1e6cc7
      Jason Wang authored
      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: default avatarJason Wang <jasowang@redhat.com>
      [mst: use virtio feature bit: VHOST_F_DEVICE_IOTLB -> VIRTIO_F_IOMMU_PLATFORM ]
      [mst: fix build warnings ]
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      [ weiyj.lk: missing unlock on error ]
      Signed-off-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
      6b1e6cc7
    • Michael S. Tsirkin's avatar
      vhost: drop vringh dependency · b2fbd8b0
      Michael S. Tsirkin authored
      vringh isn't used by vhost net or scsi - it's used
      by CAIF only at the moment. Drop the dependency.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b2fbd8b0
  2. 01 Aug, 2016 14 commits
  3. 24 Jul, 2016 2 commits
  4. 23 Jul, 2016 21 commits