From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLefC-000301-9U for qemu-devel@nongnu.org; Tue, 09 Oct 2012 14:36:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLefB-0000Yp-6t for qemu-devel@nongnu.org; Tue, 09 Oct 2012 14:36:18 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:40058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLefB-0000XS-0C for qemu-devel@nongnu.org; Tue, 09 Oct 2012 14:36:17 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so5547005pbb.4 for ; Tue, 09 Oct 2012 11:36:16 -0700 (PDT) Sender: Richard Henderson Message-ID: <50746E9E.4080903@twiddle.net> Date: Tue, 09 Oct 2012 11:36:14 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1349786252-12343-1-git-send-email-yeongkyoon.lee@samsung.com> <1349786252-12343-3-git-send-email-yeongkyoon.lee@samsung.com> In-Reply-To: <1349786252-12343-3-git-send-email-yeongkyoon.lee@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Yeongkyoon Lee Cc: qemu-devel@nongnu.org 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 address 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 block. ... > +#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 available. 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 generated code. Thus, all this conditionalization should vanish. r~