diff options
author | Eugenio Pérez <eperezma@redhat.com> | 2022-03-14 18:34:53 +0100 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2022-03-15 13:57:44 +0800 |
commit | 773ebc952ee028e6c0dbeee15f1c36ab28325899 (patch) | |
tree | dfaa03cb5a119d675e37d8630a18afc8a70c1eb3 | |
parent | 6d0b222666339d09910d495c65e6abb7d404fc2b (diff) | |
download | qemu-773ebc952ee028e6c0dbeee15f1c36ab28325899.zip qemu-773ebc952ee028e6c0dbeee15f1c36ab28325899.tar.gz qemu-773ebc952ee028e6c0dbeee15f1c36ab28325899.tar.bz2 |
vdpa: Never set log_base addr if SVQ is enabled
Setting the log address would make the device start reporting invalid
dirty memory because the SVQ vrings are located in qemu's memory.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
-rw-r--r-- | hw/virtio/vhost-vdpa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 93dbe10..89d59f8 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -1090,7 +1090,8 @@ static int vhost_vdpa_dev_start(struct vhost_dev *dev, bool started) static int vhost_vdpa_set_log_base(struct vhost_dev *dev, uint64_t base, struct vhost_log *log) { - if (vhost_vdpa_one_time_request(dev)) { + struct vhost_vdpa *v = dev->opaque; + if (v->shadow_vqs_enabled || vhost_vdpa_one_time_request(dev)) { return 0; } |