From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLu5g-0006Sy-MS for qemu-devel@nongnu.org; Wed, 10 Oct 2012 07:04:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLu5a-00076H-DS for qemu-devel@nongnu.org; Wed, 10 Oct 2012 07:04:40 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:26082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLu5a-000753-0z for qemu-devel@nongnu.org; Wed, 10 Oct 2012 07:04:34 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBO00HO1C3HD2Q0@mailout3.samsung.com> for qemu-devel@nongnu.org; Wed, 10 Oct 2012 20:04:30 +0900 (KST) Received: from [172.21.111.108] ([182.198.1.3]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MBO00G9HC3IN500@mmp1.samsung.com> for qemu-devel@nongnu.org; Wed, 10 Oct 2012 20:04:30 +0900 (KST) Date: Wed, 10 Oct 2012 20:04:47 +0900 From: Yeongkyoon Lee In-reply-to: <50746E9E.4080903@twiddle.net> Message-id: <5075564F.2070902@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: QUOTED-PRINTABLE References: <1349786252-12343-1-git-send-email-yeongkyoon.lee@samsung.com> <1349786252-12343-3-git-send-email-yeongkyoon.lee@samsung.com> <50746E9E.4080903@twiddle.net> Subject: Re: [Qemu-devel] [PATCH v5 2/3] tcg: Add declarations and templates of extended MMU helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On 2012=EB=85=84 10=EC=9B=94 10=EC=9D=BC 03:36, Richard Henderson wro= te: > On 10/09/2012 05:37 AM, Yeongkyoon Lee wrote: >> Add declarations and templates of extended MMU helpers. >> An extended helper takes an additional argument of the host addres= s accessing >> a guest memory which differs from the address of the call site to = the helper >> because helper call sites locate at the end of a generated code bl= ock. > ... >> +#ifndef CONFIG_QEMU_LDST_OPTIMIZATION > > My feedback from the last round of review is that a version of the > helper functions that take the return address should *always* be av= ailable. > > There are existing issues in the target-*/foo_helper.c files where > if a helper touches memory that we do no necessarily handle any > fault properly. This is less true of system mode than user mode, > but it's still a problem. > > The helper.c files ought to be changed to use these new "ra-enabled= " > routines and pass GETPC(). That way a fault from a helper gets > treated *exactly* like it would if it were called from TCG generate= d code. > > Thus, all this conditionalization should vanish. Do you mean that there are call sites in target-*/foo_helper.c which= =20 call the helpers of softmmu_def.h? As far as I know, there is no access to those helpers other than from= =20 the functions in softmmu_header.h in which extra argument is handled. Anyway, I'll try an approach to avoid helper fragmentation, which tak= es=20 slight performance degradation of just one instruction for each fast = path. > > > r~ >