From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 2/2] KVM: PPC: Book3S: Call into C interrupt handlers Date: Fri, 27 Apr 2012 08:58:59 +1000 Message-ID: <1335481139.21961.86.camel@pasglop> References: <1335435543-19690-1-git-send-email-agraf@suse.de> <1335435543-19690-2-git-send-email-agraf@suse.de> <4F99C41D.8030204@freescale.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Alexander Graf , kvm list , kvm-ppc To: Scott Wood Return-path: In-Reply-To: <4F99C41D.8030204@freescale.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, 2012-04-26 at 16:54 -0500, Scott Wood wrote: > On 04/26/2012 05:19 AM, Alexander Graf wrote: > > + asm("mfmsr %0" : "=r"(msr)); > > Why not just mfmsr()? > > > + asm("bl 1f; 1: mflr %0" : "=r"(ip)); > > You'll want to tell the compiler that you're trashing LR. We probably also want to make sure TRAP is set properly. Some interrupts (like perf) will test it. Cheers, Ben.