From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5cyb-0005J4-FT for qemu-devel@nongnu.org; Thu, 18 Jun 2015 12:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5cya-0002Zk-J8 for qemu-devel@nongnu.org; Thu, 18 Jun 2015 12:47:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5cya-0002ZY-Ev for qemu-devel@nongnu.org; Thu, 18 Jun 2015 12:47:40 -0400 From: Paolo Bonzini Date: Thu, 18 Jun 2015 18:47:24 +0200 Message-Id: <1434646046-27150-8-git-send-email-pbonzini@redhat.com> In-Reply-To: <1434646046-27150-1-git-send-email-pbonzini@redhat.com> References: <1434646046-27150-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 7/9] kvm: Switch to unlocked PIO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jan.kiszka@siemens.com From: Jan Kiszka Do not take the BQL before dispatching PIO requests of KVM VCPUs. Instead, address_space_rw will do it if necessary. This enables completely BQL-free PIO handling in KVM mode for upcoming devices with fine-grained locking. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- kvm-all.c | 3 +-- 1 file changed, 3 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 2bd8e9b..d3831c4 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1836,13 +1836,12 @@ int kvm_cpu_exec(CPUState *cpu) switch (run->exit_reason) { case KVM_EXIT_IO: DPRINTF("handle_io\n"); - qemu_mutex_lock_iothread(); + /* Called outside BQL */ kvm_handle_io(run->io.port, attrs, (uint8_t *)run + run->io.data_offset, run->io.direction, run->io.size, run->io.count); - qemu_mutex_unlock_iothread(); ret = 0; break; case KVM_EXIT_MMIO: -- 1.8.3.1