From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoqc9-00054u-DT for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:27:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zoqc8-0006Em-K1 for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:27:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoqc8-0006Ea-5j for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:27:24 -0400 Date: Wed, 21 Oct 2015 13:27:19 +0300 From: "Michael S. Tsirkin" Message-ID: <1445423133-5119-16-git-send-email-mst@redhat.com> References: <1445423133-5119-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1445423133-5119-1-git-send-email-mst@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 15/38] vhost: document log resizing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Thibaut Collet , =?us-ascii?B?PT9VVEYtOD9xP01hcmMtQW5kcj1DMz1BOT0yMEx1cmVhdT89?= From: Marc-Andr=E9 Lureau Signed-off-by: Marc-Andr=E9 Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- hw/virtio/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index f14a5c5..f5ecaf0 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -350,6 +350,8 @@ static inline void vhost_dev_log_resize(struct vhost_= dev* dev, uint64_t size) uint64_t log_base =3D (uintptr_t)log->log; int r; =20 + /* inform backend of log switching, this must be done before + releasing the current log, to ensure no logging is lost */ r =3D dev->vhost_ops->vhost_call(dev, VHOST_SET_LOG_BASE, &log_base)= ; assert(r >=3D 0); vhost_log_put(dev, true); --=20 MST