mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
UPSTREAM: vdpa: make get_vq_group and set_group_asid optional
This patch makes get_vq_group and set_group_asid optional. This is needed to unbreak the vDPA parent that doesn't support multiple address spaces. Cc: Gautam Dawar <gautam.dawar@xilinx.com> Fixes:aaca8373c4("vhost-vdpa: support ASID based IOTLB API") Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220609041901.2029-1-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit00d1f54647) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I83cce7173bc7ec6dd00479932d5515bfacb50fe1
This commit is contained in:
parent
b9e82f6f75
commit
3063325104
|
|
@ -499,6 +499,8 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
|
|||
ops->set_vq_ready(vdpa, idx, s.num);
|
||||
return 0;
|
||||
case VHOST_VDPA_GET_VRING_GROUP:
|
||||
if (!ops->get_vq_group)
|
||||
return -EOPNOTSUPP;
|
||||
s.index = idx;
|
||||
s.num = ops->get_vq_group(vdpa, idx);
|
||||
if (s.num >= vdpa->ngroups)
|
||||
|
|
|
|||
|
|
@ -176,7 +176,8 @@ struct vdpa_map_file {
|
|||
* for the device
|
||||
* @vdev: vdpa device
|
||||
* Returns virtqueue algin requirement
|
||||
* @get_vq_group: Get the group id for a specific virtqueue
|
||||
* @get_vq_group: Get the group id for a specific
|
||||
* virtqueue (optional)
|
||||
* @vdev: vdpa device
|
||||
* @idx: virtqueue index
|
||||
* Returns u32: group id for this virtqueue
|
||||
|
|
@ -241,7 +242,7 @@ struct vdpa_map_file {
|
|||
* Returns the iova range supported by
|
||||
* the device.
|
||||
* @set_group_asid: Set address space identifier for a
|
||||
* virtqueue group
|
||||
* virtqueue group (optional)
|
||||
* @vdev: vdpa device
|
||||
* @group: virtqueue group
|
||||
* @asid: address space id for this group
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user