From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 15 Sep 2011 21:36:16 +0000 Subject: Re: [PATCH 4/5] KVM: PPC: e500: eliminate a trap when entering idle Message-Id: <4E726FD0.5080905@freescale.com> List-Id: References: <20110826233144.GD30607@schlenkerla.am.freescale.net> In-Reply-To: <20110826233144.GD30607@schlenkerla.am.freescale.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On 09/05/2011 05:30 PM, Alexander Graf wrote: > > On 27.08.2011, at 01:31, Scott Wood wrote: > >> +#ifdef CONFIG_E500 >> + /* >> + * Skip the overhead of HID0 accesses that KVM ignores -- >> + * just write MSR[WE]. >> + * >> + * We don't need _TLF_NAPPING, because under KVM we know >> + * it will take effect right away. >> + */ >> + if (ppc_md.power_save = e500_idle) >> + ppc_md.power_save = kvm_msrwe_idle; > > Why the if() here? To avoid replacing some other power_save() implementation. kvm_msrwe_idle() is a paravirt-optimized version of e500_idle(). However, now that e500_idle has an ifdef for e500mc, we'll need that ifdef here as well. e500mc doesn't use MSR[WE] (and if it did, we couldn't trap on it). For e500mc we'll want to make an hcall for idle (ePAPR EV_IDLE). -Scott