From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 1/4] KVM: PPC: Book3s: PR: Disable preemption in vcpu_run Date: Tue, 13 Dec 2011 15:15:07 -0600 Message-ID: <4EE7C05B.3020709@freescale.com> References: <1323444412-18482-1-git-send-email-agraf@suse.de> <1323444412-18482-2-git-send-email-agraf@suse.de> <4EE25149.7010109@freescale.com> <9FD32B52-754D-494D-8478-CAD3FDFAB586@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: , =?ISO-8859-1?Q?J=F6rg_Sommer?= , KVM list To: Alexander Graf Return-path: In-Reply-To: <9FD32B52-754D-494D-8478-CAD3FDFAB586@suse.de> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 12/09/2011 05:18 PM, Alexander Graf wrote: > > On 09.12.2011, at 19:19, Scott Wood wrote: > >> Shouldn't you really have interrupts disabled here, as booke does? > > Ah, thanks for the reminder. Yeah, we probably want to disable > interrupts in parallel to checking for signals (basically from one > signal check point to world switch). I'm just not 100% sure how to > easily sync the C and asm code on the first entry though. Doing > local_irq_disable in C and undoing it in asm could become ugly with > lazy interrupt disabling. Lots of things get ugly with lazy interrupt disabling. :-( There should be other examples of handling the lazy EE stuff in asm code. After you hard-disable, you should just need to poke the right fields in the PACA with the state you plan to end up in after the rfi, similar to exception return. -Scott