From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 16 Feb 2012 16:58:06 +0000 Subject: Re: [PATCH v4 3/3] KVM: PPC: epapr: install ev_idle hcall for e500 guest Message-Id: <4F3D359E.6030209@freescale.com> List-Id: 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> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: Liu Yu , "" , "" , "" , "" On 02/16/2012 04:24 AM, Alexander Graf wrote: > On 16.02.2012, at 10:26, Liu Yu wrote: >> +_GLOBAL(epapr_ev_idle) >> +epapr_ev_idle: >> + rlwinm r3,r1,0,0,31-THREAD_SHIFT /* current thread_info */ >> + lwz r4,TI_LOCAL_FLAGS(r3) /* set napping bit */ >> + ori r4,r4,_TLF_NAPPING /* so when we take an exception */ >> + stw r4,TI_LOCAL_FLAGS(r3) /* it will return to our caller */ >> + >> + wrteei 1 >> + >> +idle_loop: >> + LOAD_REG_IMMEDIATE(r11, HC_VENDOR_EPAPR | HC_EV_IDLE) >> + >> +.global epapr_ev_idle_start >> +epapr_ev_idle_start: >> + li r3, -1 >> + nop >> + nop >> + nop > > Can't you just bl into epapr_hypercall_start? You don't even have to save the old lr. because we never return anyways :) The interrupt will branch to LR, so no, we can't trash it or put it anywhere else. -scott From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from TX2EHSOBE004.bigfish.com (tx2ehsobe005.messaging.microsoft.com [65.55.88.15]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 7F48C1007D3 for ; Fri, 17 Feb 2012 03:58:13 +1100 (EST) Message-ID: <4F3D359E.6030209@freescale.com> Date: Thu, 16 Feb 2012 10:58:06 -0600 From: Scott Wood MIME-Version: 1.0 To: Alexander Graf Subject: Re: [PATCH v4 3/3] KVM: PPC: epapr: install ev_idle hcall for e500 guest 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> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Cc: "" , Liu Yu , "" , "" , "" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 02/16/2012 04:24 AM, Alexander Graf wrote: > On 16.02.2012, at 10:26, Liu Yu wrote: >> +_GLOBAL(epapr_ev_idle) >> +epapr_ev_idle: >> + rlwinm r3,r1,0,0,31-THREAD_SHIFT /* current thread_info */ >> + lwz r4,TI_LOCAL_FLAGS(r3) /* set napping bit */ >> + ori r4,r4,_TLF_NAPPING /* so when we take an exception */ >> + stw r4,TI_LOCAL_FLAGS(r3) /* it will return to our caller */ >> + >> + wrteei 1 >> + >> +idle_loop: >> + LOAD_REG_IMMEDIATE(r11, HC_VENDOR_EPAPR | HC_EV_IDLE) >> + >> +.global epapr_ev_idle_start >> +epapr_ev_idle_start: >> + li r3, -1 >> + nop >> + nop >> + nop > > Can't you just bl into epapr_hypercall_start? You don't even have to save the old lr. because we never return anyways :) The interrupt will branch to LR, so no, we can't trash it or put it anywhere else. -scott 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 10:58:06 -0600 Message-ID: <4F3D359E.6030209@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> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: Liu Yu , "" , "" , "" , "" To: Alexander Graf Return-path: In-Reply-To: Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 02/16/2012 04:24 AM, Alexander Graf wrote: > On 16.02.2012, at 10:26, Liu Yu wrote: >> +_GLOBAL(epapr_ev_idle) >> +epapr_ev_idle: >> + rlwinm r3,r1,0,0,31-THREAD_SHIFT /* current thread_info */ >> + lwz r4,TI_LOCAL_FLAGS(r3) /* set napping bit */ >> + ori r4,r4,_TLF_NAPPING /* so when we take an exception */ >> + stw r4,TI_LOCAL_FLAGS(r3) /* it will return to our caller */ >> + >> + wrteei 1 >> + >> +idle_loop: >> + LOAD_REG_IMMEDIATE(r11, HC_VENDOR_EPAPR | HC_EV_IDLE) >> + >> +.global epapr_ev_idle_start >> +epapr_ev_idle_start: >> + li r3, -1 >> + nop >> + nop >> + nop > > Can't you just bl into epapr_hypercall_start? You don't even have to save the old lr. because we never return anyways :) The interrupt will branch to LR, so no, we can't trash it or put it anywhere else. -scott