From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 2/7] memory: Flush coalesced MMIO on selected region access Date: Thu, 28 Jun 2012 19:07:40 +0300 Message-ID: <4FEC814C.9040808@redhat.com> References: <35d20ce2ae928e21ff715c86f854860d164ff8c9.1340814444.git.jan.kiszka@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , qemu-devel , kvm , Liu Ping Fan , Marcelo Tosatti To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27744 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753175Ab2F1QIT (ORCPT ); Thu, 28 Jun 2012 12:08:19 -0400 In-Reply-To: <35d20ce2ae928e21ff715c86f854860d164ff8c9.1340814444.git.jan.kiszka@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/27/2012 07:27 PM, Jan Kiszka wrote: > Instead of flushing pending coalesced MMIO requests on every vmexit, > this provides a mechanism to selectively flush when memory regions > related to the coalesced one are accessed. This first of all includes > the coalesced region itself but can also applied to other regions, e.g. > of the same device, by calling memory_region_set_flush_coalesced. > > + > +void memory_region_clear_flush_coalesced(MemoryRegion *mr) > +{ > + qemu_flush_coalesced_mmio_buffer(); > + mr->flush_coalesced_mmio = false; > +} This will clear the implicit flag set by set_coalesced, but also any explicit flag set by set_flush_coalesced. In some convoluted setup that will never happen, this can cause breakage. This can be addresses either using two flags (or perhaps using the coalesced list for the implicit flag) or by a comment in clear_coalesced's documentation. -- error compiling committee.c: too many arguments to function