aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2022-12-15 12:31:43 +0100
committerMichael S. Tsirkin <mst@redhat.com>2022-12-21 06:35:28 -0500
commit6188d78a19894ac8f2bf9484d48a5235a529d3b7 (patch)
tree8727469334bd02aeceb1c11f3da9e40d7509e85c /include
parent7f211a28fd5482f76583988beecd8ee61588d45e (diff)
downloadqemu-6188d78a19894ac8f2bf9484d48a5235a529d3b7.zip
qemu-6188d78a19894ac8f2bf9484d48a5235a529d3b7.tar.gz
qemu-6188d78a19894ac8f2bf9484d48a5235a529d3b7.tar.bz2
vdpa: add shadow_data to vhost_vdpa
The memory listener that thells the device how to convert GPA to qemu's va is registered against CVQ vhost_vdpa. memory listener translations are always ASID 0, CVQ ones are ASID 1 if supported. Let's tell the listener if it needs to register them on iova tree or not. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20221215113144.322011-12-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/vhost-vdpa.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h
index e57dfa1..45b969a 100644
--- a/include/hw/virtio/vhost-vdpa.h
+++ b/include/hw/virtio/vhost-vdpa.h
@@ -40,6 +40,8 @@ typedef struct vhost_vdpa {
struct vhost_vdpa_iova_range iova_range;
uint64_t acked_features;
bool shadow_vqs_enabled;
+ /* Vdpa must send shadow addresses as IOTLB key for data queues, not GPA */
+ bool shadow_data;
/* IOVA mapping used by the Shadow Virtqueue */
VhostIOVATree *iova_tree;
GPtrArray *shadow_vqs;