From patchwork Sun Oct 28 23:48:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pingfank@linux.vnet.ibm.com X-Patchwork-Id: 194769 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 821772C008F for ; Mon, 29 Oct 2012 11:41:51 +1100 (EST) Received: from localhost ([::1]:37830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TScc5-0007Qb-8J for incoming@patchwork.ozlabs.org; Sun, 28 Oct 2012 19:49:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TScbQ-0005oI-6Q for qemu-devel@nongnu.org; Sun, 28 Oct 2012 19:49:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TScbP-0003u5-3t for qemu-devel@nongnu.org; Sun, 28 Oct 2012 19:49:12 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:48879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TScbO-0003tJ-D3 for qemu-devel@nongnu.org; Sun, 28 Oct 2012 19:49:11 -0400 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 29 Oct 2012 05:19:08 +0530 Received: from d28relay02.in.ibm.com (9.184.220.59) by e28smtp04.in.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 29 Oct 2012 05:19:06 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9SNn5hN40304848 for ; Mon, 29 Oct 2012 05:19:05 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9T5IvuV008876 for ; Mon, 29 Oct 2012 05:18:57 GMT Received: from oc8440477808.ibm.com ([9.125.25.249]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q9T5IebP008036; Mon, 29 Oct 2012 05:18:55 GMT From: Liu Ping Fan To: qemu-devel@nongnu.org Date: Mon, 29 Oct 2012 07:48:47 +0800 Message-Id: <1351468127-15025-9-git-send-email-pingfank@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1351468127-15025-1-git-send-email-pingfank@linux.vnet.ibm.com> References: <1351468127-15025-1-git-send-email-pingfank@linux.vnet.ibm.com> x-cbid: 12102823-5564-0000-0000-00000510EFB8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 122.248.162.4 Cc: Peter Maydell , Stefan Hajnoczi , Marcelo Tosatti , Avi Kivity , Anthony Liguori , Jan Kiszka , Paolo Bonzini Subject: [Qemu-devel] [patch v5 8/8] vcpu: push mmio dispatcher out of big lock X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Liu Ping Fan --- kvm-all.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index c2c6909..e92e43c 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1573,10 +1573,14 @@ int kvm_cpu_exec(CPUArchState *env) break; case KVM_EXIT_MMIO: DPRINTF("handle_mmio\n"); + qemu_mutex_unlock_iothread(); + qemu_thread_set_dispatch_type(DISPATCH_MMIO); cpu_physical_memory_rw(run->mmio.phys_addr, run->mmio.data, run->mmio.len, run->mmio.is_write); + qemu_thread_reset_dispatch_type(); + qemu_mutex_lock_iothread(); ret = 0; break; case KVM_EXIT_IRQ_WINDOW_OPEN: