From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn5ny-0001Tw-Vl for qemu-devel@nongnu.org; Fri, 06 Jul 2012 06:30:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sn5nt-0006Ky-K0 for qemu-devel@nongnu.org; Fri, 06 Jul 2012 06:30:30 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:40470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn5nt-0006Jo-9l for qemu-devel@nongnu.org; Fri, 06 Jul 2012 06:30:25 -0400 Received: from epcpsbgm1.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M6Q00IS1IF96EW0@mailout2.samsung.com> for qemu-devel@nongnu.org; Fri, 06 Jul 2012 19:30:21 +0900 (KST) Received: from [172.21.111.108] ([182.198.1.3]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M6Q00GEFIILNJ80@mmp2.samsung.com> for qemu-devel@nongnu.org; Fri, 06 Jul 2012 19:30:21 +0900 (KST) Message-id: <4FF6BE3E.8040808@samsung.com> Date: Fri, 06 Jul 2012 19:30:22 +0900 From: Yeongkyoon Lee MIME-version: 1.0 References: <1341494619-4714-1-git-send-email-yeongkyoon.lee@samsung.com> <1341494619-4714-2-git-send-email-yeongkyoon.lee@samsung.com> In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit Subject: Re: [Qemu-devel] [RFC][PATCH v2 1/4] tcg: add declarations and templates of extended MMU helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: laurent.desnogues@gmail.com, chenwj@iis.sinica.edu.tw, qemu-devel@nongnu.org, e.voevodin@samsung.com >> Add declarations and templates of extended MMU helpers which can take return address argument to what helper functions return. These extended helper functions are called only by generated code. > It's not entirely clear from this description what the > return address argument actually is. My commit message might give confusion. The return address is originally expressed as "retaddr" in softmmu_template.h. It means the runtime host pc which access guest memory. In previous standard MMU helpers, the address is the caller's pc of MMU helper calculated from GETPC(), however, in new optimized MMU helpers, the address is different from the caller's pc because the call site is located end of TB. > Also, please line wrap your commit messages. I didn't know the line wrap rule of commit message. Is the rule included in checkpatch.pl? Let me check it. >> +#if defined(CONFIG_QEMU_LDST_OPTIMIZATION) >> +/* Extended versions of MMU helpers for qemu_ld/st optimization. >> + They get return address arguments because the caller PCs are not where helpers return to. */ > This is >80 characters ; please use checkpatch.pl. Ok. >> +uint8_t __ext_ldb_mmu(target_ulong addr, int mmu_idx, uintptr_t ra); > '__' is a prefix reserved for the system. I know we have existing usage > of it, but I think it would be better to avoid adding new uses. Ok, I'll fix it. >> +#ifdef USE_EXTENDED_HELPER >> +/* Exteneded helper funtions have one more argument of address >> + to which pc is returned after setting TLB entry */ > "Extended". "functions". Ok.