1. 01 Nov, 2023 3 commits
    • Si-Wei Liu's avatar
      vhost-vdpa: introduce descriptor group backend feature · 7db0d602
      Si-Wei Liu authored
      Userspace knows if the device has dedicated descriptor group or not
      by checking this feature bit.
      
      It's only exposed if the vdpa driver backend implements the
      .get_vq_desc_group() operation callback. Userspace trying to negotiate
      this feature when it or the dependent _F_IOTLB_ASID feature hasn't
      been exposed will result in an error.
      Signed-off-by: default avatarSi-Wei Liu <si-wei.liu@oracle.com>
      Acked-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20231018171456.1624030-5-dtatulea@nvidia.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarSi-Wei Liu <si-wei.liu@oracle.com>
      Tested-by: default avatarSi-Wei Liu <si-wei.liu@oracle.com>
      Tested-by: default avatarLei Yang <leiyang@redhat.com>
      7db0d602
    • Si-Wei Liu's avatar
      vdpa: introduce dedicated descriptor group for virtqueue · a72cac60
      Si-Wei Liu authored
      In some cases, the access to the virtqueue's descriptor area, device
      and driver areas (precluding indirect descriptor table in guest memory)
      may have to be confined to a different address space than where its
      buffers reside. Without loss of simplicity and generality with already
      established terminology, let's fold up these 3 areas and call them
      as a whole as descriptor table group, or descriptor group for short.
      Specifically, in case of split virtqueues, descriptor group consists of
      regions for Descriptor Table, Available Ring and Used Ring; for packed
      virtqueues layout, descriptor group contains Descriptor Ring, Driver
      and Device Event Suppression structures.
      
      The group ID for a dedicated descriptor group can be obtained through a
      new .get_vq_desc_group() op. If driver implements this op, it means that
      the descriptor, device and driver areas of the virtqueue may reside
      in a dedicated group than where its buffers reside, a.k.a the default
      virtqueue group through the .get_vq_group() op.
      
      In principle, the descriptor group may or may not have same group ID
      as the default group. Even if the descriptor group has a different ID,
      meaning the vq's descriptor group areas can optionally move to a
      separate address space than where guest memory resides, the descriptor
      group may still start from a default address space, same as where its
      buffers reside. To move the descriptor group to a different address
      space, .set_group_asid() has to be called to change the ASID binding
      for the group, which is no different than what needs to be done on any
      other virtqueue group. On the other hand, the .reset() semantics also
      applies on descriptor table group, meaning the device reset will clear
      all ASID bindings and move all virtqueue groups including descriptor
      group back to the default address space, i.e. in ASID 0.
      
      QEMU's shadow virtqueue is going to utilize dedicated descriptor group
      to speed up map and unmap operations, yielding tremendous downtime
      reduction by avoiding the full and slow remap cycle in SVQ switching.
      Signed-off-by: default avatarSi-Wei Liu <si-wei.liu@oracle.com>
      Acked-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20231018171456.1624030-4-dtatulea@nvidia.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarSi-Wei Liu <si-wei.liu@oracle.com>
      Tested-by: default avatarSi-Wei Liu <si-wei.liu@oracle.com>
      Tested-by: default avatarLei Yang <leiyang@redhat.com>
      a72cac60
    • Michael S. Tsirkin's avatar
      Merge branch 'mlx5-vhost' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git · 71d47b31
      Michael S. Tsirkin authored
      This merges a single commit that contains changes to mlx5_ifc.h
      It's required to support vq descriptor mappings in mlx5/vdpa
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      71d47b31
  2. 30 Oct, 2023 1 commit
  3. 28 Oct, 2023 15 commits
  4. 27 Oct, 2023 15 commits
  5. 26 Oct, 2023 6 commits