From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7nUQ-0001Gc-Ew for qemu-devel@nongnu.org; Wed, 24 Jun 2015 12:25:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7nUM-0003uF-9P for qemu-devel@nongnu.org; Wed, 24 Jun 2015 12:25:30 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:33798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7nUL-0003sg-UW for qemu-devel@nongnu.org; Wed, 24 Jun 2015 12:25:26 -0400 Received: by wicnd19 with SMTP id nd19so139707622wic.1 for ; Wed, 24 Jun 2015 09:25:25 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 24 Jun 2015 18:25:10 +0200 Message-Id: <1435163110-2724-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1435163110-2724-1-git-send-email-pbonzini@redhat.com> References: <1435163110-2724-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 9/9] kvm: Switch to unlocked MMIO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: borntraeger@de.ibm.com, famz@redhat.com 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 07bdcfa..9053ef9 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1811,13 +1811,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: -- 1.8.3.1