From patchwork Wed Jun 27 16:27:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 167706 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AA3861009C6 for ; Thu, 28 Jun 2012 02:29:18 +1000 (EST) Received: from localhost ([::1]:45066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sjv7E-0002tE-D1 for incoming@patchwork.ozlabs.org; Wed, 27 Jun 2012 12:29:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sjv71-0002jz-HJ for qemu-devel@nongnu.org; Wed, 27 Jun 2012 12:29:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sjv6z-0002wl-Ad for qemu-devel@nongnu.org; Wed, 27 Jun 2012 12:29:03 -0400 Received: from david.siemens.de ([192.35.17.14]:26636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sjv6z-0002w4-0a for qemu-devel@nongnu.org; Wed, 27 Jun 2012 12:29:01 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.13.6/8.13.6) with ESMTP id q5RGSZLg030122; Wed, 27 Jun 2012 18:28:35 +0200 Received: from mchn199C.mchp.siemens.de ([139.22.42.91]) by mail1.siemens.de (8.13.6/8.13.6) with SMTP id q5RGRaFh016003; Wed, 27 Jun 2012 18:28:24 +0200 From: Jan Kiszka To: Anthony Liguori , qemu-devel Date: Wed, 27 Jun 2012 18:27:27 +0200 Message-Id: X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.14 Cc: Liu Ping Fan , Avi Kivity , kvm , Marcelo Tosatti Subject: [Qemu-devel] [PATCH v2 5/7] memory: Flush coalesced MMIO on mapping and state changes 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 Flush pending coalesced MMIO before performing mapping or state changes that could affect the event orderings or route the buffered requests to a wrong region. Signed-off-by: Jan Kiszka --- memory.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index 902a8c1..7cffddf 100644 --- a/memory.c +++ b/memory.c @@ -733,6 +733,7 @@ static void address_space_update_topology(AddressSpace *as) void memory_region_transaction_begin(void) { + qemu_flush_coalesced_mmio_buffer(); ++memory_region_transaction_depth; }