From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq4eh-0000eZ-T6 for qemu-devel@nongnu.org; Wed, 25 Jan 2012 10:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq4ef-0004pr-RK for qemu-devel@nongnu.org; Wed, 25 Jan 2012 10:20:59 -0500 Message-ID: <4F201D58.6060604@suse.de> Date: Wed, 25 Jan 2012 16:18:48 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1327433600-7403-1-git-send-email-aliguori@us.ibm.com> <1327433600-7403-28-git-send-email-aliguori@us.ibm.com> <4F1F0E2D.2020706@web.de> <4F1F12E7.2020309@us.ibm.com> <4F1F1C28.4040600@web.de> <4F1F1E91.50609@codemonkey.ws> <4F1F233B.8040804@web.de> <4F1F2875.3050509@codemonkey.ws> <4F1F2B77.2020703@web.de> <4F1F38B6.7000506@codemonkey.ws> <4F1FBF31.2020002@web.de> <4F200AEE.20504@codemonkey.ws> <4F201077.1000906@web.de> <4F201464.1010303@codemonkey.ws> In-Reply-To: <4F201464.1010303@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 27/28] sysbus: apic: ioapic: convert to QEMU Object Model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , "Michael S. Tsirkin" , Alexander Graf , qemu-devel@nongnu.org, Blue Swirl , Jan Kiszka , Paul Brook , qemu-ppc@nongnu.org, Aurelien Jarno , Gerd Hoffmann Am 25.01.2012 15:40, schrieb Anthony Liguori: > On 01/25/2012 08:23 AM, Jan Kiszka wrote: >> On 2012-01-25 15:00, Anthony Liguori wrote: >>> On 01/25/2012 02:37 AM, Jan Kiszka wrote: >>>> On 2012-01-25 00:03, Anthony Liguori wrote: >>>>> They're exactly the same size (16 lines). If you embed TypeInfo in= to >>>>> DeviceTypeInfo, and introduce a Device specific type registration >>>>> function, then you could do: >>>>> >>>>> static DeviceTypeInfo my_device_type_info =3D { >>>>> .type.name =3D TYPE_MY_DEVICE, >>>>> .type.parent =3D TYPE_PARENT_DEVICE, >>>>> .reset =3D my_device_reset, >>>> >>>> And if you introduce some >>>> >>>> #define TYPE_UNIMPLEMENTED (void *)&dummy_variable >>> >>> (void *) isn't compatible with integers or function pointers (at leas= t >>> not in a portable way). >=20 > I don't see how they can be compatible since on some platforms > sizeof(void (*)(void)) !=3D sizeof(void *). Do you have an example of a platform relevant to QEMU? Microcontrollers and DOS come to my mind. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg