From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqP8K-0004hq-Nt for qemu-devel@nongnu.org; Thu, 16 Oct 2008 05:27:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqP8I-0004hI-DP for qemu-devel@nongnu.org; Thu, 16 Oct 2008 05:27:03 -0400 Received: from [199.232.76.173] (port=58196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqP8H-0004h2-SB for qemu-devel@nongnu.org; Thu, 16 Oct 2008 05:27:02 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42244) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KqP8H-0005Wa-FB for qemu-devel@nongnu.org; Thu, 16 Oct 2008 05:27:01 -0400 Message-ID: <48F708DE.40509@redhat.com> Date: Thu, 16 Oct 2008 11:26:54 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1224107718-19128-1-git-send-email-glommer@redhat.com> <1224107718-19128-22-git-send-email-glommer@redhat.com> In-Reply-To: <1224107718-19128-22-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 21/21] provide an opaque for accelerator in cpu state Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, jan.kiszka@siemens.com, jes@sgi.com, qemu-devel@nongnu.org, avi@qumranet.com, dmitry.baryshkov@siemens.com Glauber Costa wrote: > Convert kqemu to use it. We also provide a small macro > to easy the access to the accelerator fields. > > > +#define accel_opaque_field(env, type, field) ((type *)env->accel_opaque)->field > + > Since we already allow the accelerator to customize the allocation of CPUState, why is this needed? For example, kqemu would allocate a KqemuCPUState (which has a CPUState field, which is the return value), and use container_of() to get to the kqemu-specific fields. -- error compiling committee.c: too many arguments to function