From patchwork Fri Jan 8 01:58:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 71708 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o081wZiV018181 for ; Fri, 8 Jan 2010 01:58:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753125Ab0AHB6Z (ORCPT ); Thu, 7 Jan 2010 20:58:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753038Ab0AHB6O (ORCPT ); Thu, 7 Jan 2010 20:58:14 -0500 Received: from cantor.suse.de ([195.135.220.2]:42397 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036Ab0AHB6L (ORCPT ); Thu, 7 Jan 2010 20:58:11 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 5B25890975; Fri, 8 Jan 2010 02:58:10 +0100 (CET) From: Alexander Graf To: kvm@vger.kernel.org Cc: kvm-ppc , Benjamin Herrenschmidt Subject: [PATCH 5/9] KVM: PPC: Get rid of unnecessary RFI Date: Fri, 8 Jan 2010 02:58:05 +0100 Message-Id: <1262915889-11526-6-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1262915889-11526-1-git-send-email-agraf@suse.de> References: <1262915889-11526-1-git-send-email-agraf@suse.de> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/powerpc/kvm/book3s_64_interrupts.S b/arch/powerpc/kvm/book3s_64_interrupts.S index 66e3b11..3c0ba55 100644 --- a/arch/powerpc/kvm/book3s_64_interrupts.S +++ b/arch/powerpc/kvm/book3s_64_interrupts.S @@ -221,15 +221,8 @@ no_dcbz32_off: mflr r5 std r5, VCPU_LR(r7) - /* XXX convert to safe function call */ - /* Restore host msr -> SRR1 */ ld r6, VCPU_HOST_MSR(r7) - mtsrr1 r6 - - /* Restore host IP -> SRR0 */ - ld r5, VCPU_HOST_RETIP(r7) - mtsrr0 r5 /* * For some interrupts, we need to call the real Linux @@ -246,8 +239,9 @@ no_dcbz32_off: cmpwi r12, BOOK3S_INTERRUPT_DECREMENTER beq call_linux_handler - /* Back to Interruptable Mode! (goto kvm_return_point) */ - RFI + /* Back to EE=1 */ + mtmsr r6 + b kvm_return_point call_linux_handler: @@ -260,10 +254,16 @@ call_linux_handler: * interrupt handler! * * R3 still contains the exit code, - * R6 VCPU_HOST_RETIP and - * R7 VCPU_HOST_MSR + * R5 VCPU_HOST_RETIP and + * R6 VCPU_HOST_MSR */ + /* Restore host IP -> SRR0 */ + ld r5, VCPU_HOST_RETIP(r7) + + /* XXX Better move to a safe function? + * What if we get an HTAB flush in between mtsrr0 and mtsrr1? */ + mtlr r12 ld r4, VCPU_TRAMPOLINE_LOWMEM(r7)