diff options
author | Eugenio Pérez | 2021-10-14 16:12:36 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2021-10-20 10:37:55 +0200 |
commit | 013108b6e51e1c10b78859e2e091202364aa7a7d (patch) | |
tree | b3520190e397232a7349a871b7bdad06c11fc1e9 /include/hw | |
parent | vdpa: Add vhost_vdpa_section_end (diff) | |
download | qemu-013108b6e51e1c10b78859e2e091202364aa7a7d.tar.gz qemu-013108b6e51e1c10b78859e2e091202364aa7a7d.tar.xz qemu-013108b6e51e1c10b78859e2e091202364aa7a7d.zip |
vdpa: Check for iova range at mappings changes
Check vdpa device range before updating memory regions so we don't add
any outside of it, and report the invalid change if any.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20211014141236.923287-4-eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/virtio/vhost-vdpa.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h index a8963da2d9..c288cf7ecb 100644 --- a/include/hw/virtio/vhost-vdpa.h +++ b/include/hw/virtio/vhost-vdpa.h @@ -13,6 +13,7 @@ #define HW_VIRTIO_VHOST_VDPA_H #include "hw/virtio/virtio.h" +#include "standard-headers/linux/vhost_types.h" typedef struct VhostVDPAHostNotifier { MemoryRegion mr; @@ -24,6 +25,7 @@ typedef struct vhost_vdpa { uint32_t msg_type; bool iotlb_batch_begin_sent; MemoryListener listener; + struct vhost_vdpa_iova_range iova_range; struct vhost_dev *dev; VhostVDPAHostNotifier notifier[VIRTIO_QUEUE_MAX]; } VhostVDPA; |