From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StK8Y-0004Sj-ST for qemu-devel@nongnu.org; Mon, 23 Jul 2012 11:01:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StK8R-0000up-Ln for qemu-devel@nongnu.org; Mon, 23 Jul 2012 11:01:30 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:45442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StK8R-0000uh-Dj for qemu-devel@nongnu.org; Mon, 23 Jul 2012 11:01:23 -0400 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Jul 2012 16:01:20 +0100 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6NF1I9j3072200 for ; Mon, 23 Jul 2012 16:01:18 +0100 Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6NF1HGQ007761 for ; Mon, 23 Jul 2012 09:01:17 -0600 Date: Mon, 23 Jul 2012 17:01:15 +0200 From: Cornelia Huck Message-ID: <20120723170115.3e235fe7@BR9GNB5Z> In-Reply-To: <500D5F63.4030602@redhat.com> References: <1342811652-16931-1-git-send-email-peter.maydell@linaro.org> <500A52BF.9080207@web.de> <500A730F.8040604@web.de> <500A7A02.3050301@web.de> <500A8303.8020903@web.de> <500A8DAE.3040909@web.de> <500AA21E.9050506@web.de> <500AABC8.7080406@web.de> <20120723140418.76d8f874@BR9GNB5Z> <500D4129.8030200@redhat.com> <20120723150600.57f2aab5@BR9GNB5Z> <500D4E1A.4010708@redhat.com> <20120723155507.5ca26587@BR9GNB5Z> <500D5F63.4030602@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Peter Maydell , kvm , patches@linaro.org, Marcelo Tosatti , qemu-devel@nongnu.org, Alexander Graf , Jan Kiszka On Mon, 23 Jul 2012 17:27:47 +0300 Avi Kivity wrote: > On 07/23/2012 04:55 PM, Cornelia Huck wrote: > >> > Basically, we have some flags in our control block we can set so that > >> > the cpu drops out of SIE whenever external/I/O/... interrupts are > >> > enabled and then have the host do the lowcore updates, psw swaps, etc. > >> > >> Can you write them from a different cpu and expect them to take effect? > >> > >> How do you emulate an interrupt with a large guest? You have to update > >> the flags in the control blocks for all vcpus; then restore them when > >> the interrupt is delivered? > > > > We may access the flags for any vcpu via the kvm_s390_float_interrupt > > structure which is contained in kvm->arch. > > > > We'll get control when a vcpu enters a wait state and try to deliver > > pending interrupts or set/clear the flags. Moreover, idle vcpus are on > > a wait queue and are the first target for getting an interrupt injected. > > Okay. And you can ask a vcpu to exit when it enables interrupts, > without interrupting it? Yes. See arch/s390/kvm/interrupt.c and the CPUSTAT_* flags. > > On x86, we have to IPI the vcpu so it drops to the host, ask it to let > us know when interrupts are enabled, and let it run again. > Cornelia