From: Christian =?iso-8859-1?q?Borntr=E4ger?= Subject: Re: [PATCH 3/3] kvm-s390: streamline memslot handling Date: Tue, 26 May 2009 10:31:11 +0200 Message-ID: <200905261031.12391.borntraeger@de.ibm.com> References: <1242826497-6797-1-git-send-email-ehrhardt@linux.vnet.ibm.com> <4A1A57D8.4070203@linux.vnet.ibm.com> <4A1BA106.6070600@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Christian Ehrhardt , kvm@vger.kernel.org, cotte@de.ibm.com, heiko.carstens@de.ibm.com, schwidefsky@de.ibm.com, Marcelo Tosatti To: Avi Kivity Return-path: Received: from mtagate8.de.ibm.com ([195.212.29.157]:59499 "EHLO mtagate8.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753331AbZEZIcJ (ORCPT ); Tue, 26 May 2009 04:32:09 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.14.3/8.13.8) with ESMTP id n4Q8VDVa056886 for ; Tue, 26 May 2009 08:31:13 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4Q8VDui991426 for ; Tue, 26 May 2009 10:31:13 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4Q8VCWR029999 for ; Tue, 26 May 2009 10:31:13 +0200 In-Reply-To: <4A1BA106.6070600@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Am Dienstag 26 Mai 2009 09:57:58 schrieb Avi Kivity: > > I could add that behaviour, but that could make our normal interrupt > > handling much slower. Therefore I don't want to call that function, > > but on the other hand I like the "skip if the request is already set" > > functionality and think about adding that in my loop. > > I don't understand why it would affect your interrupt handling. We need As far as I understand x86, every host interrupt causes a guest exit. On s390 the SIE instruction is interruptible. On a host interrupt (like an IPI) the host interrupt handler runs and finally jumps back into the SIE instruction. The hardware will continue with guest execution. This has the advantage, that we dont have to load/save guest and host registers on host interrupts. (the low level interrupt handler saves the registers of the interrupted context) In our low-level interrupt handler we do check for signal_pending, machine_check_pending and need_resched to leave the sie instruction. For anything else a the host sees a cpu bound guest always in the SIE instruction. Christian