From: Eugenio Pérez Date: Mon, 14 Mar 2022 17:34:53 +0000 (+0100) Subject: vdpa: Never set log_base addr if SVQ is enabled X-Git-Tag: v7.0.0-rc0~6^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=773ebc952ee028e6c0dbeee15f1c36ab28325899;p=thirdparty%2Fqemu.git 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 Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 93dbe1043cc..89d59f86f97 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; }