From patchwork Thu Aug 6 12:40:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 504686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A20A31402B7 for ; Thu, 6 Aug 2015 22:48:46 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=k7fCwDQp; dkim-atps=neutral Received: from localhost ([::1]:44924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNKUa-0002EM-70 for incoming@patchwork.ozlabs.org; Thu, 06 Aug 2015 08:41:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNKTv-00025T-B5 for qemu-devel@nongnu.org; Thu, 06 Aug 2015 08:41:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNKTu-0008MF-0m for qemu-devel@nongnu.org; Thu, 06 Aug 2015 08:41:11 -0400 Received: from mail-qg0-x229.google.com ([2607:f8b0:400d:c04::229]:35783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNKTt-0008M6-RJ for qemu-devel@nongnu.org; Thu, 06 Aug 2015 08:41:09 -0400 Received: by qgj62 with SMTP id 62so26256971qgj.2 for ; Thu, 06 Aug 2015 05:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=ESoL9WEhwKOh9N+hj2hWZuvEcVVE1Re8RhiWFrKmB0Q=; b=k7fCwDQpVVkVlvEGaO0dZdW41fFjaORmA0wftPsXv94HYBL3VxAHILlWOQRCduZR50 tkekprbkPOY7hJ1/rdpm1YRI6tznu76S65vfBd+0OnzoqkhWXBhTnRuze6dne5BIxP9R p1CfmvforNJq02n2SyhrdzXXl6dowXW5I9hD4D0XOdSSOeUN7TC6c+lSuEz0wNAesfYp Y3KHoQtyPL7Yjd8P81ZY6uqMFokOJnguAdfkhM5OoLHHwZ78J6HKNH5x3H+aZ9jeJP1G ebA7rzAvRVj7TBPPL2COcB0h/BlIcg0MeggiU6hkAy5/kpmjJ2put8h++NROjQr8i6jx ZrlQ== X-Received: by 10.140.17.139 with SMTP id 11mr2568686qgd.65.1438864869467; Thu, 06 Aug 2015 05:41:09 -0700 (PDT) Received: from localhost (bne75-h02-31-39-163-232.dsl.sta.abo.bbox.fr. [31.39.163.232]) by smtp.gmail.com with ESMTPSA id d8sm3127266qka.21.2015.08.06.05.41.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Aug 2015 05:41:08 -0700 (PDT) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Thu, 6 Aug 2015 14:40:41 +0200 Message-Id: <1438864852-4939-6-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1438864852-4939-1-git-send-email-marcandre.lureau@redhat.com> References: <1438864852-4939-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::229 Cc: haifeng.lin@huawei.com, mst@redhat.com, thibaut.collet@6wind.com, jasowang@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [Qemu-devel] [PATCH v3 05/16] vhost: document log resizing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 862e786..057d548 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -357,6 +357,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);