From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC5cf-0000Cg-TG for qemu-devel@nongnu.org; Mon, 06 Jul 2015 08:35:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC5cd-0006Mq-OX for qemu-devel@nongnu.org; Mon, 06 Jul 2015 08:35:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC5cd-0006Md-7U for qemu-devel@nongnu.org; Mon, 06 Jul 2015 08:35:43 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id DA84436B398 for ; Mon, 6 Jul 2015 12:35:42 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-50.ams2.redhat.com [10.36.112.50]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t66CZ8Nl009626 for ; Mon, 6 Jul 2015 08:35:41 -0400 From: Paolo Bonzini Date: Mon, 6 Jul 2015 14:35:06 +0200 Message-Id: <1436186108-29747-18-git-send-email-pbonzini@redhat.com> In-Reply-To: <1436186108-29747-1-git-send-email-pbonzini@redhat.com> References: <1436186108-29747-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 17/19] kvm: Switch to unlocked MMIO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Do not take the BQL before dispatching MMIO requests of KVM VCPUs. Instead, address_space_rw will do it if necessary. This enables completely BQL-free MMIO handling in KVM mode for upcoming devices with fine-grained locking. Signed-off-by: Paolo Bonzini Message-Id: <1434646046-27150-10-git-send-email-pbonzini@redhat.com> --- kvm-all.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index ad5ac5e..df57da0 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1814,13 +1814,12 @@ int kvm_cpu_exec(CPUState *cpu) break; case KVM_EXIT_MMIO: DPRINTF("handle_mmio\n"); - qemu_mutex_lock_iothread(); + /* Called outside BQL */ address_space_rw(&address_space_memory, run->mmio.phys_addr, attrs, run->mmio.data, run->mmio.len, run->mmio.is_write); - qemu_mutex_unlock_iothread(); ret = 0; break; case KVM_EXIT_IRQ_WINDOW_OPEN: -- 2.4.3