From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmHj1-0006pc-5v for qemu-devel@nongnu.org; Tue, 20 Sep 2016 05:52:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmHiw-00040D-VM for qemu-devel@nongnu.org; Tue, 20 Sep 2016 05:52:26 -0400 Received: from 6.mo69.mail-out.ovh.net ([46.105.50.107]:50370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmHiw-0003xC-PU for qemu-devel@nongnu.org; Tue, 20 Sep 2016 05:52:22 -0400 Received: from player789.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id 589211000E33 for ; Tue, 20 Sep 2016 11:52:21 +0200 (CEST) References: <1474266577-11704-1-git-send-email-nikunj@linux.vnet.ibm.com> <1474266577-11704-7-git-send-email-nikunj@linux.vnet.ibm.com> <87r38frtw1.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> <19c378eb-33d7-3e61-ec53-3de5ea40f407@kaod.org> <87lgynrsm0.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> <87h99brnyi.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> <1f1eee33-6f01-f24a-3b99-4a8d9b6a2f7b@kaod.org> <87d1jysyaj.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <08d4c8d2-1a9c-feeb-b6b8-016a5015b303@kaod.org> Date: Tue, 20 Sep 2016 11:52:13 +0200 MIME-Version: 1.0 In-Reply-To: <87d1jysyaj.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 6/9] ppc/xics: Split ICS into ics-base and ics class List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania , qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Cc: qemu-devel@nongnu.org On 09/20/2016 11:41 AM, Nikunj A Dadhania wrote: > C=C3=A9dric Le Goater writes: >> On 09/20/2016 10:10 AM, Nikunj A Dadhania wrote: >>>>>>>>> -static void ics_reject(ICSState *ics, int nr); >>>>>>>>> -static void ics_resend(ICSState *ics, int server); >>>>>>>>> -static void ics_eoi(ICSState *ics, int nr); >>>>>>>>> +static void ics_reject(ICSState *ics, uint32_t nr) >>>>>>>>> +{ >>>>>>>>> + ICSStateClass *k =3D ICS_GET_CLASS(ics); >>>>>>>> >>>>>>>> Shouldn't that be ICS_BASE_GET_CLASS() >>>>>>> >>>>>>> The class hierarchy is something like this: >>>>>>> >>>>>>> ICS_BASE -> ICS_SIMPLE -> ICS_KVM >>>>>> >>>>>> yes. but if we called ics_* with an instance of an ics class whic= h is=20 >>>>>> not a ICS_SIMPLE class that will break. >>>>> >>>>> Correct >>>>> >>>>>> ICSStateClass is the baseclass, whenever we call methods on a ICSS= tate*=20 >>>>>> object, we should use the method defines in ICSStateClass. >>>>> >>>>> Hmm, in that case I need to initialize base class methods in >>>>> instance_init of ics_simple >>>> >>>> yes but this is done, no ? I see :=20 >>>> >>>> static void ics_simple_class_init(ObjectClass *klass, void *data) >>>> { >>>> DeviceClass *dc =3D DEVICE_CLASS(klass); >>>> ICSStateClass *isc =3D ICS_BASE_CLASS(klass); >>> >>> Right. >>> >>> Currently, we have this: >>> >>> + ICSStateClass *isc =3D ICS_CLASS(klass); >> >> oh yes and same in the kvm ICS. The name are bit confusing as we are=20 >> introducing SIMPLE but not the associated macros. >> >> You can check on my 2.8 github branch, I got something working there : >> >> https://github.com/legoater/qemu/commit/d0b492707debc7192f0860e2c5fc2= daa9fd453ac >=20 > Cool. :-) >=20 > Thanks for testing. I did some tests for pnv, pseries tcg and kvm.=20 It didn't see any migration issues, yet. Do you have some scenario=20 to reproduce the fix you are trying to add ? That's under tcg with a e1000 ?=20 Thanks, C. =20