From patchwork Wed Apr 6 20:41:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 90076 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C42B9B6EF0 for ; Thu, 7 Apr 2011 07:17:30 +1000 (EST) Received: from localhost ([127.0.0.1]:42444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7a6S-0004yf-1e for incoming@patchwork.ozlabs.org; Wed, 06 Apr 2011 17:17:28 -0400 Received: from [140.186.70.92] (port=41163 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7Zdw-0006Cs-E5 for qemu-devel@nongnu.org; Wed, 06 Apr 2011 16:48:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7ZYJ-0001zb-DR for qemu-devel@nongnu.org; Wed, 06 Apr 2011 16:42:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7ZYJ-0001zP-42 for qemu-devel@nongnu.org; Wed, 06 Apr 2011 16:42:11 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p36Kg9un001796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 Apr 2011 16:42:09 -0400 Received: from redhat.com (vpn-200-170.tlv.redhat.com [10.35.200.170]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p36Kg7TK006850; Wed, 6 Apr 2011 16:42:08 -0400 Date: Wed, 6 Apr 2011 23:41:51 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Subject: [Qemu-devel] [PATCH RFC 3/5] vhost: skip memory which needs dirty logging X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org vhost doesn't support write logging (except for migration), anyway. Signed-off-by: Michael S. Tsirkin --- hw/vhost.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/vhost.c b/hw/vhost.c index dc3d0e2..257e3dd 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -311,6 +311,10 @@ static void vhost_client_set_memory(CPUPhysMemoryClient *client, int r; dev->mem = qemu_realloc(dev->mem, s); + if (log_dirty) { + flags = IO_MEM_UNASSIGNED; + } + assert(size); vhost_dev_unassign_memory(dev, start_addr, size);