From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQFMq-0005Jh-I1 for qemu-devel@nongnu.org; Mon, 22 Oct 2012 06:36:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQFMi-00021J-Nm for qemu-devel@nongnu.org; Mon, 22 Oct 2012 06:36:20 -0400 Received: from thoth.sbs.de ([192.35.17.2]:25278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQFMi-00020m-Cr for qemu-devel@nongnu.org; Mon, 22 Oct 2012 06:36:12 -0400 Message-ID: <50852191.4020401@siemens.com> Date: Mon, 22 Oct 2012 12:36:01 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1350897839-29593-1-git-send-email-pingfank@linux.vnet.ibm.com> <1350897839-29593-12-git-send-email-pingfank@linux.vnet.ibm.com> <50852099.2060209@redhat.com> In-Reply-To: <50852099.2060209@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [patch v4 11/16] vcpu: push mmio dispatcher out of big lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Liu Ping Fan , Stefan Hajnoczi , Marcelo Tosatti , "qemu-devel@nongnu.org" , Anthony Liguori , Paolo Bonzini On 2012-10-22 12:31, Avi Kivity wrote: > On 10/22/2012 11:23 AM, Liu Ping Fan wrote: >> Signed-off-by: Liu Ping Fan >> --- >> kvm-all.c | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/kvm-all.c b/kvm-all.c >> index b3fa597..3d7ae18 100644 >> --- a/kvm-all.c >> +++ b/kvm-all.c >> @@ -1562,12 +1562,15 @@ int kvm_cpu_exec(CPUArchState *env) >> break; >> case KVM_EXIT_MMIO: >> DPRINTF("handle_mmio\n"); >> + qemu_mutex_unlock_iothread(); >> set_context_type(1); >> cpu_physical_memory_rw(run->mmio.phys_addr, >> run->mmio.data, >> run->mmio.len, >> run->mmio.is_write); >> set_context_type(0); >> + qemu_mutex_lock_iothread(); >> + >> ret = 0; >> break; >> case KVM_EXIT_IRQ_WINDOW_OPEN: >> > > This is fine for now, but of course later we'll have to remove the lock > completely and apply it for the other exits (and other processing, when > needed). I think we can do this already, I posted a patch some time ago. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux