From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37744 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMcLa-0004sU-Tb for qemu-devel@nongnu.org; Sun, 28 Nov 2010 03:10:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMcLZ-0008QU-Ve for qemu-devel@nongnu.org; Sun, 28 Nov 2010 03:10:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMcLZ-0008QN-Oz for qemu-devel@nongnu.org; Sun, 28 Nov 2010 03:10:57 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAS8ArFK021119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 28 Nov 2010 03:10:54 -0500 Date: Sun, 28 Nov 2010 10:10:35 +0200 From: "Michael S. Tsirkin" Message-ID: <20101128081035.GA2249@redhat.com> References: <20101127140506.16888.96397.stgit@dhcp-91-7.nay.redhat.com.englab.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101127140506.16888.96397.stgit@dhcp-91-7.nay.redhat.com.englab.nay.redhat.com> Subject: [Qemu-devel] Re: [PATCH] vhost: Fix address calculation in vhost_dev_sync_region() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: qemu-devel@nongnu.org On Sat, Nov 27, 2010 at 10:05:07PM +0800, Jason Wang wrote: > We still need advance address even we find there's no dirty pages in > current chunk. > > Signed-off-by: Jason Wang > --- > hw/vhost.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) Applied, thanks! > diff --git a/hw/vhost.c b/hw/vhost.c > index 8586f66..6082da2 100644 > --- a/hw/vhost.c > +++ b/hw/vhost.c > @@ -37,6 +37,7 @@ static void vhost_dev_sync_region(struct vhost_dev *dev, > /* We first check with non-atomic: much cheaper, > * and we expect non-dirty to be the common case. */ > if (!*from) { > + addr += VHOST_LOG_CHUNK; > continue; > } > /* Data must be read atomically. We don't really