From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH v4 3/3] KVM: PPC: epapr: install ev_idle hcall for e500 guest Date: Thu, 16 Feb 2012 11:36:09 -0600 Message-ID: <4F3D3E89.3050301@freescale.com> References: <1329384365-4028-1-git-send-email-yu.liu@freescale.com> <1329384365-4028-2-git-send-email-yu.liu@freescale.com> <1329384365-4028-3-git-send-email-yu.liu@freescale.com> <4F3D359E.6030209@freescale.com> <9A00D501-8965-478F-8356-6199F5572600@suse.de> <4F3D3CBA.2060201@freescale.com> <144AF998-6DEE-453A-872A-B148ACA2B7B8@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: Liu Yu , "" , "" , "" , "" To: Alexander Graf Return-path: Received: from am1ehsobe005.messaging.microsoft.com ([213.199.154.208]:38293 "EHLO AM1EHSOBE005.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753998Ab2BPRgV (ORCPT ); Thu, 16 Feb 2012 12:36:21 -0500 In-Reply-To: <144AF998-6DEE-453A-872A-B148ACA2B7B8@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On 02/16/2012 11:30 AM, Alexander Graf wrote: > > On 16.02.2012, at 18:28, Scott Wood wrote: > >> On 02/16/2012 11:18 AM, Alexander Graf wrote: >>> Hrm. But we can clobber ctr, right? So how about we make the generic version do a bctr and then just do a small C wrapper that takes lr, moves it to ctr and branches to the generic one? >> >> If it's just for this, I would say don't mess with the normal hcall path >> for the sake of idle. If using CTR would let us get away without >> creating a stack frame in call sites, maybe that would be worthwhile, >> depending on what sort of hcalls we end up having. >> >>> Then we don't have to replicate the hypercall code all over again for every invocation. >> >> We shouldn't need to do it for every invocation. Idle is special due to >> the TLF_NAPPING hack. > > Famous last words. If it's the only case, duplication should be ok. Let's hope there are no others. Actually, we can't use CTR -- it's volatile in the ePAPR hypercall ABI. -Scott