From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kt0Wf-0008BG-BV for qemu-devel@nongnu.org; Thu, 23 Oct 2008 09:46:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kt0Wd-00088U-Pd for qemu-devel@nongnu.org; Thu, 23 Oct 2008 09:46:56 -0400 Received: from [199.232.76.173] (port=51963 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kt0Wd-00088N-Bn for qemu-devel@nongnu.org; Thu, 23 Oct 2008 09:46:55 -0400 Received: from mx2.redhat.com ([66.187.237.31]:55848) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kt0Wd-0005Km-4Z for qemu-devel@nongnu.org; Thu, 23 Oct 2008 09:46:55 -0400 Message-ID: <49008054.3000203@redhat.com> Date: Thu, 23 Oct 2008 15:47:00 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1224771556-11146-1-git-send-email-glommer@redhat.com> <1224771556-11146-28-git-send-email-glommer@redhat.com> <49007C82.9080300@redhat.com> <49007D88.6050402@siemens.com> In-Reply-To: <49007D88.6050402@siemens.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 27/32] arch-specific hooks for accelerator Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: aliguori@us.ibm.com, Glauber Costa , jes@sgi.com, qemu-devel@nongnu.org, dmitry.baryshkov@siemens.com Jan Kiszka wrote: >>> void (*trace_io)(CPUState *env); >>> int (*break_loop)(CPUState *env); >>> int (*cpu_exec)(CPUState *env); >>> + void *arch; /* arch-specific accel functions */ >>> } QEMUAccel >>> >> This is more elegant IMO using container_of() and including the common >> part as a member. Less pointers to chase. >> > > ...or to have some kind of QEMUAccel_arch, defined in target-*/accel.h > files. Haven't looked into the use cases yet to say what is sufficient. > You're right, there's no need for run-time dynamic types here. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.