From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: qemu-kvm vs. qemu: Terminate cpu loop on reset? Date: Fri, 7 Jan 2011 18:53:59 +0200 Message-ID: <20110107165359.GA10205@redhat.com> References: <4D2737EB.6070002@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm , qemu-devel To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1030 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753176Ab1AGQyE (ORCPT ); Fri, 7 Jan 2011 11:54:04 -0500 Content-Disposition: inline In-Reply-To: <4D2737EB.6070002@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jan 07, 2011 at 04:57:31PM +0100, Jan Kiszka wrote: > Hi, > > does anyone immediately know if this hunk from vl.c > > @@ -1278,6 +1197,10 @@ void qemu_system_reset_request(void) > } else { > reset_requested = 1; > } > + if (cpu_single_env) { > + cpu_single_env->stopped = 1; > + cpu_exit(cpu_single_env); > + } > qemu_notify_event(); > } > > is (semantically) relevant for upstream as well? IIUC, it ensures that > the kvm cpu loop is not continued if an IO access called into > qemu_system_reset_request. > I don't know TCG enough to tell. If TCG can continue vcpu execution after io without checking reset_requested then it is relevant for upstream too. > If yes, then it would be a good time to push a patch: these bits will > fall to dust on next merge from upstream (vl.c no longer has access to > the cpu state). > On a next merge cpu state will have to be exposed to vl.c then. This code cannot be dropped in qemu-kvm. -- Gleb.