From patchwork Fri Jan 8 01:58:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 71706 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 o081wZiR018181 for ; Fri, 8 Jan 2010 01:58:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753090Ab0AHB6O (ORCPT ); Thu, 7 Jan 2010 20:58:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753081Ab0AHB6N (ORCPT ); Thu, 7 Jan 2010 20:58:13 -0500 Received: from cantor.suse.de ([195.135.220.2]:42396 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753012Ab0AHB6L (ORCPT ); Thu, 7 Jan 2010 20:58:11 -0500 Received: from relay1.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 57D3190847; Fri, 8 Jan 2010 02:58:10 +0100 (CET) From: Alexander Graf To: kvm@vger.kernel.org Cc: kvm-ppc , Benjamin Herrenschmidt Subject: [PATCH 9/9] KVM: PPC: Pass program interrupt flags to the guest Date: Fri, 8 Jan 2010 02:58:09 +0100 Message-Id: <1262915889-11526-10-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.c b/arch/powerpc/kvm/book3s.c index 66b5924..02861fd 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -633,6 +633,9 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, case BOOK3S_INTERRUPT_PROGRAM: { enum emulation_result er; + ulong flags; + + flags = (vcpu->arch.shadow_msr & 0x1f0000ull); if (vcpu->arch.msr & MSR_PR) { #ifdef EXIT_DEBUG @@ -640,7 +643,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, #endif if ((vcpu->arch.last_inst & 0xff0007ff) != (INS_DCBZ & 0xfffffff7)) { - kvmppc_book3s_queue_irqprio(vcpu, exit_nr); + kvmppc_core_queue_program(vcpu, flags); r = RESUME_GUEST; break; } @@ -655,7 +658,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, case EMULATE_FAIL: printk(KERN_CRIT "%s: emulation at %lx failed (%08x)\n", __func__, vcpu->arch.pc, vcpu->arch.last_inst); - kvmppc_book3s_queue_irqprio(vcpu, exit_nr); + kvmppc_core_queue_program(vcpu, flags); r = RESUME_GUEST; break; default: