From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wju99-0000mT-2k for qemu-devel@nongnu.org; Mon, 12 May 2014 13:36:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wju8y-00018j-SG for qemu-devel@nongnu.org; Mon, 12 May 2014 13:36:15 -0400 Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]:62155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wju8y-00018e-OM for qemu-devel@nongnu.org; Mon, 12 May 2014 13:36:04 -0400 Received: by mail-qg0-f50.google.com with SMTP id z60so7931208qgd.37 for ; Mon, 12 May 2014 10:36:04 -0700 (PDT) Sender: Richard Henderson Message-ID: <53710680.5000400@twiddle.net> Date: Mon, 12 May 2014 10:36:00 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1399565391-27833-1-git-send-email-pbonzini@redhat.com> <1399565391-27833-12-git-send-email-pbonzini@redhat.com> In-Reply-To: <1399565391-27833-12-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 11/11] softmmu: move all load/store functions to cpu_ldst.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org On 05/08/2014 09:09 AM, Paolo Bonzini wrote: > diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h > index a6b7884..e5550e7 100644 > --- a/include/exec/cpu_ldst.h > +++ b/include/exec/cpu_ldst.h > @@ -28,8 +28,373 @@ > #ifndef CPU_LDST_H > #define CPU_LDST_H > > -#if !defined(CONFIG_USER_ONLY) > -#include "exec/softmmu_exec.h" > +#if defined(CONFIG_USER_ONLY) > +/* All direct uses of g2h and h2g need to go away for usermode softmmu. */ > +#define g2h(x) ((void *)((unsigned long)(target_ulong)(x) + GUEST_BASE)) As an extremely minor nit, I'd prefer CONFIG_SOFTMMU be the conditional checked here, so that, as the comment notes, one day we can have CONFIG_SOFTMMU and CONFIG_USER_ONLY defined at the same time. r~