From patchwork Tue Mar 23 16:53:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 87699 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2NGtJgO012905 for ; Tue, 23 Mar 2010 16:55:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752045Ab0CWQzQ (ORCPT ); Tue, 23 Mar 2010 12:55:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22409 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752624Ab0CWQzI (ORCPT ); Tue, 23 Mar 2010 12:55:08 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2NGt766017792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Mar 2010 12:55:08 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2NGt7MI004016; Tue, 23 Mar 2010 12:55:07 -0400 Received: from amt.cnet (vpn-10-84.rdu.redhat.com [10.11.10.84]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o2NGt67s032102; Tue, 23 Mar 2010 12:55:06 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 10EFD65208A; Tue, 23 Mar 2010 13:54:06 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id o2NGs4lB019923; Tue, 23 Mar 2010 13:54:04 -0300 Message-Id: <20100323165347.307341883@amt.cnet> User-Agent: quilt/0.47-1 Date: Tue, 23 Mar 2010 13:53:37 -0300 From: Marcelo Tosatti To: kvm@vger.kernel.org Cc: Marcelo Tosatti Subject: [patch 4/6] qemu-kvm: use upstream kvm_flush_coalesced_mmio_buffer References: <20100323165333.062022913@amt.cnet> Content-Disposition: inline; filename=flush-coalesced-cleanup X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Mar 2010 16:55:20 +0000 (UTC) Index: qemu-kvm-cleanups/qemu-kvm.c =================================================================== --- qemu-kvm-cleanups.orig/qemu-kvm.c +++ qemu-kvm-cleanups/qemu-kvm.c @@ -935,19 +935,7 @@ int kvm_run(CPUState *env) post_kvm_run(kvm, env); -#if defined(KVM_CAP_COALESCED_MMIO) - if (kvm_state->coalesced_mmio) { - struct kvm_coalesced_mmio_ring *ring = - (void *) run + kvm_state->coalesced_mmio * PAGE_SIZE; - while (ring->first != ring->last) { - cpu_physical_memory_rw(ring->coalesced_mmio[ring->first].phys_addr, - &ring->coalesced_mmio[ring->first].data[0], - ring->coalesced_mmio[ring->first].len, 1); - smp_wmb(); - ring->first = (ring->first + 1) % KVM_COALESCED_MMIO_MAX; - } - } -#endif + kvm_flush_coalesced_mmio_buffer(); #if !defined(__s390__) if (r == -1) {