From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 0/9] S390x KVM support Date: Mon, 02 Nov 2009 21:23:02 +0100 Message-ID: <4AEF3FA6.9050301@suse.de> References: <1255963059-10298-1-git-send-email-agraf@suse.de> <4ADDE7E3.9090601@de.ibm.com> <4AE0210D.9020409@redhat.com> <98DC9E4C-7FFA-4F05-A2E8-0B5DF546891C@suse.de> <4AE02B8E.6070202@redhat.com> <8D99A5FD-8A2E-4DA9-90A5-6935F677F9FD@suse.de> <4AE02DE2.7010803@redhat.com> <4AE0327D.7010809@de.ibm.com> <4AE033E2.5090902@redhat.com> <4AE0376A.4070803@de.ibm.com> <4AE038BC.1070107@redhat.com> <4AE03DAD.3000602@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , carsteno@linux.vnet.ibm.com, qemu-devel , uli@suse.de, Carsten Otte , hare@suse.de, KVM list To: Carsten Otte Return-path: Received: from cantor.suse.de ([195.135.220.2]:45109 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755657AbZKBUW6 (ORCPT ); Mon, 2 Nov 2009 15:22:58 -0500 In-Reply-To: <4AE03DAD.3000602@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Carsten Otte wrote: > Avi Kivity wrote: >> So why not do it for this instruction as well? Instead of updating >> the psw, return a success/error code and let the kernel update psw. > It's not a single instruction, but a set of reasons we need the psw in > userspace: > - for logging the instruction address on exits > - to check if a wait-type psw is active, and if so to switch between: > - enabled wait psws, where interrupts could wake the cpu (aka > /halt, which needs to be handled in-kernel) > - disabled wait psws, where CPUs are suspended due to cpu > hotremove, system dump on panic > - to handle cpus in stopped state, typically on regular > reboots/shutdowns > > - for setting the condition code during implementation of: > - all s/390 I/O instructions > - IPI for restarting remote CPUs (that are not in KVM_RUN) > - IPI for storing remote CPU status into the remote cpu's lowcore page > - IPI for resetting remote CPUs > - for all IPIs where the remote CPU is not known to the kernel, such > as the detection loop for all 65535 cpu slots on startup of the > guest kernel > - for interpretion of service calls (usually to the machine's service > processor) > - virtio I/O > > The sweet thing about having the psw in userspace is that for almost > all above reasons, there's nothing more than the psw that we need to > have in order to perform that operation. Giving the 128-bit psw to > userspace does simply save us having special cases for above list, > with an exit_reason and a struct for each of them. Any progress on the patch? This is really important to make KVM work properly on S390. I'd even go as far as suggesting it for linux-stable. Alex From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N53Qj-00018e-LX for qemu-devel@nongnu.org; Mon, 02 Nov 2009 15:23:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N53Qf-00017w-S8 for qemu-devel@nongnu.org; Mon, 02 Nov 2009 15:23:09 -0500 Received: from [199.232.76.173] (port=43231 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N53Qf-00017t-J2 for qemu-devel@nongnu.org; Mon, 02 Nov 2009 15:23:05 -0500 Received: from cantor.suse.de ([195.135.220.2]:45110 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N53Qf-0000AY-4u for qemu-devel@nongnu.org; Mon, 02 Nov 2009 15:23:05 -0500 Message-ID: <4AEF3FA6.9050301@suse.de> Date: Mon, 02 Nov 2009 21:23:02 +0100 From: Alexander Graf MIME-Version: 1.0 References: <1255963059-10298-1-git-send-email-agraf@suse.de> <4ADDE7E3.9090601@de.ibm.com> <4AE0210D.9020409@redhat.com> <98DC9E4C-7FFA-4F05-A2E8-0B5DF546891C@suse.de> <4AE02B8E.6070202@redhat.com> <8D99A5FD-8A2E-4DA9-90A5-6935F677F9FD@suse.de> <4AE02DE2.7010803@redhat.com> <4AE0327D.7010809@de.ibm.com> <4AE033E2.5090902@redhat.com> <4AE0376A.4070803@de.ibm.com> <4AE038BC.1070107@redhat.com> <4AE03DAD.3000602@de.ibm.com> In-Reply-To: <4AE03DAD.3000602@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/9] S390x KVM support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Carsten Otte Cc: Carsten Otte , carsteno@linux.vnet.ibm.com, KVM list , qemu-devel , hare@suse.de, Avi Kivity Carsten Otte wrote: > Avi Kivity wrote: >> So why not do it for this instruction as well? Instead of updating >> the psw, return a success/error code and let the kernel update psw. > It's not a single instruction, but a set of reasons we need the psw in > userspace: > - for logging the instruction address on exits > - to check if a wait-type psw is active, and if so to switch between: > - enabled wait psws, where interrupts could wake the cpu (aka > /halt, which needs to be handled in-kernel) > - disabled wait psws, where CPUs are suspended due to cpu > hotremove, system dump on panic > - to handle cpus in stopped state, typically on regular > reboots/shutdowns > > - for setting the condition code during implementation of: > - all s/390 I/O instructions > - IPI for restarting remote CPUs (that are not in KVM_RUN) > - IPI for storing remote CPU status into the remote cpu's lowcore page > - IPI for resetting remote CPUs > - for all IPIs where the remote CPU is not known to the kernel, such > as the detection loop for all 65535 cpu slots on startup of the > guest kernel > - for interpretion of service calls (usually to the machine's service > processor) > - virtio I/O > > The sweet thing about having the psw in userspace is that for almost > all above reasons, there's nothing more than the psw that we need to > have in order to perform that operation. Giving the 128-bit psw to > userspace does simply save us having special cases for above list, > with an exit_reason and a struct for each of them. Any progress on the patch? This is really important to make KVM work properly on S390. I'd even go as far as suggesting it for linux-stable. Alex