Skip to content

vdpa: Check iova range on memory regions ops

Eugenio Pérez qemu-devel virtualization 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 4 repliesIn review
  2. v33 patches 5 repliesSuperseded
  3. v23 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches7 repliesSuperseded

Changes in v4 from the cover letter

* Change default value from UINT64_MAX >> 1 to UINT64_MAX, making it aligned with the kernel.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vdpa: Skip protected ram IOMMU mappingshw/virtio/vhost-vdpa.c+1 -01 reply
2/3vdpa: Add vhost_vdpa_section_endhw/virtio/vhost-vdpa.c+15 -71 reply
3/3vdpa: Check for iova range at mappings changeshw/virtio/trace-events hw/virtio/vhost-vdpa.c include/hw/virtio/vhost-vdpa.h+49 -162 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJason WangStefano Garzarella
1/3A-b R-b
2/3A-b R-b
3/3A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] vdpa: Check iova range on memory regions ops

At this moment vdpa will not send memory regions bigger than 1<<63. However, actual iova range could be way more restrictive than that.

Since we can obtain the range through vdpa ioctl call, just save it from the beginning of the operation and check against it.

Changes from v3:
* Change default value from UINT64_MAX >> 1 to UINT64_MAX, making it aligned with the kernel.

Changes from v2:
* Fallback to a default value in case kernel does not support VHOST_VDPA_GET_IOVA_RANGE syscall.

Changes from v1:
* Use of int128_gt instead of plain uint64_t < comparison on memory range end.
* Document vhost_vdpa_section_end's return value so it's clear that it returns "one past end".

Eugenio Pérez (3):
vdpa: Skip protected ram IOMMU mappings
vdpa: Add vhost_vdpa_section_end
vdpa: Check for iova range at mappings changes

 include/hw/virtio/vhost-vdpa.h |  2 +
 hw/virtio/vhost-vdpa.c         | 81 +++++++++++++++++++++++++---------
 hw/virtio/trace-events         |  1 +
 3 files changed, 63 insertions(+), 21 deletions(-)
Signature · 1 line
2.27.0