From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [v1][PATCH 1/1] KVM: PPC: disable preemption when using hard_irq_disable() Date: Wed, 10 Jul 2013 14:15:40 -0500 Message-ID: <1373483740.8183.223@snotra> References: <1373436139-27998-1-git-send-email-tiejun.chen@windriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Transfer-Encoding: 8BIT Cc: , , , To: Tiejun Chen Return-path: In-Reply-To: <1373436139-27998-1-git-send-email-tiejun.chen@windriver.com> (from tiejun.chen@windriver.com on Wed Jul 10 01:02:19 2013) Content-Disposition: inline Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 07/10/2013 01:02:19 AM, Tiejun Chen wrote: > We should ensure the preemption cannot occur while calling get_paca() > insdide hard_irq_disable(), otherwise the paca_struct may be the > wrong one just after. And btw, we may update timing stats in this > case. The soft-ee mechanism depends on accessing the PACA directly via r13 to avoid this. We probably should be using inline asm to read was_enabled rather than hoping the compiler doesn't do anything silly. Plus what Alex said, regarding this patch specifically. -Scott