]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen.git/commitdiff
vhost: document log resizing
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 9 Oct 2015 15:17:22 +0000 (17:17 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 22 Oct 2015 11:34:49 +0000 (14:34 +0300)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
hw/virtio/vhost.c

index f14a5c513358150799fc002107fd66576b4ce1bf..f5ecaf0d020c4b5332c618157dc38a63b45e6ea4 100644 (file)
@@ -350,6 +350,8 @@ static inline void vhost_dev_log_resize(struct vhost_dev* dev, uint64_t size)
     uint64_t log_base = (uintptr_t)log->log;
     int r;
 
+    /* inform backend of log switching, this must be done before
+       releasing the current log, to ensure no logging is lost */
     r = dev->vhost_ops->vhost_call(dev, VHOST_SET_LOG_BASE, &log_base);
     assert(r >= 0);
     vhost_log_put(dev, true);