From: Jason Wang Date: Sat, 27 Nov 2010 14:05:07 +0000 (+0800) Subject: vhost: Fix address calculation in vhost_dev_sync_region() X-Git-Tag: v0.14.0-rc0~403^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c600ce2a7a419c7247b2ac63327dea5daa3d5a2;p=thirdparty%2Fqemu.git vhost: Fix address calculation in vhost_dev_sync_region() We still need advance address even we find there's no dirty pages in current chunk. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/vhost.c b/hw/vhost.c index 8586f66bacc..6082da287ef 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