From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDvK-0003kr-GJ for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYDvJ-0003fH-M8 for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:22:14 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:37724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDvJ-0003fB-GV for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:22:13 -0400 Received: by wixw10 with SMTP id w10so39722639wix.0 for ; Wed, 18 Mar 2015 06:22:13 -0700 (PDT) Received: from localhost.localdomain (net-37-117-129-240.cust.vodafonedsl.it. [37.117.129.240]) by mx.google.com with ESMTPSA id m9sm3137704wiz.24.2015.03.18.06.22.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 06:22:12 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 18 Mar 2015 14:21:49 +0100 Message-Id: <1426684909-95030-9-git-send-email-pbonzini@redhat.com> In-Reply-To: <1426684909-95030-1-git-send-email-pbonzini@redhat.com> References: <1426684909-95030-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 8/8] 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, call the unlocked version of address_space_rw. This enables completely BQL-free MMIO handling in KVM mode for upcoming devices with fine-grained locking. Signed-off-by: Paolo Bonzini --- kvm-all.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 2848e5b..fa0cfed 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1813,12 +1813,11 @@ int kvm_cpu_exec(CPUState *cpu) break; case KVM_EXIT_MMIO: DPRINTF("handle_mmio\n"); - qemu_mutex_lock_iothread(); - cpu_physical_memory_rw(run->mmio.phys_addr, - run->mmio.data, - run->mmio.len, - run->mmio.is_write); - qemu_mutex_unlock_iothread(); + address_space_rw_unlocked(&address_space_memory, + run->mmio.phys_addr, + run->mmio.data, + run->mmio.len, + run->mmio.is_write); ret = 0; break; case KVM_EXIT_IRQ_WINDOW_OPEN: -- 2.3.0