From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyCCY-0002cj-F6 for qemu-devel@nongnu.org; Fri, 29 May 2015 00:47:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyCCX-00054U-9J for qemu-devel@nongnu.org; Fri, 29 May 2015 00:47:22 -0400 Date: Fri, 29 May 2015 11:35:55 +1000 From: David Gibson Message-ID: <20150529013555.GA20986@voom.redhat.com> References: <1432606979-28556-1-git-send-email-david@gibson.dropbear.id.au> <1432606979-28556-5-git-send-email-david@gibson.dropbear.id.au> <20150526101924.385257c1@thh440s> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <20150526101924.385257c1@thh440s> Subject: Re: [Qemu-devel] [PATCHv2 4/4] spapr: Add sPAPRMachineClass List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: lvivier@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, afaerber@suse.de --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 26, 2015 at 10:19:24AM +0200, Thomas Huth wrote: > On Tue, 26 May 2015 12:22:59 +1000 > David Gibson wrote: >=20 > > Currently although we have an sPAPRMachineState descended from MachineS= tate > > we don't have an sPAPRMAchineClass descended from MachineClass. So far= it > > hasn't been needed, but several upcoming features are going to want it, > > so this patch creates a stub implementation. > >=20 > > Signed-off-by: Michael Roth > > Signed-off-by: Bharata B Rao > > Signed-off-by: David Gibson > > --- > > hw/ppc/spapr.c | 1 + > > include/hw/ppc/spapr.h | 15 +++++++++++++++ > > 2 files changed, 16 insertions(+) > >=20 > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > index 63877b9..a607096 100644 > > --- a/hw/ppc/spapr.c > > +++ b/hw/ppc/spapr.c > > @@ -1808,6 +1808,7 @@ static const TypeInfo spapr_machine_info =3D { > > .abstract =3D true, > > .instance_size =3D sizeof(sPAPRMachineState), > > .instance_init =3D spapr_machine_initfn, > > + .class_size =3D sizeof(sPAPRMachineClass), > > .class_init =3D spapr_machine_class_init, > > .interfaces =3D (InterfaceInfo[]) { > > { TYPE_FW_PATH_PROVIDER }, > > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h > > index 785b094..0aeac50 100644 > > --- a/include/hw/ppc/spapr.h > > +++ b/include/hw/ppc/spapr.h > > @@ -15,11 +15,26 @@ typedef struct sPAPREventLogEntry sPAPREventLogEntr= y; > > #define HPTE64_V_HPTE_DIRTY 0x0000000000000040ULL > > #define SPAPR_ENTRY_POINT 0x100 > > =20 > > +typedef struct sPAPRMachineClass sPAPRMachineClass; > > typedef struct sPAPRMachineState sPAPRMachineState; > > =20 > > #define TYPE_SPAPR_MACHINE "spapr-machine" > > #define SPAPR_MACHINE(obj) \ > > OBJECT_CHECK(sPAPRMachineState, (obj), TYPE_SPAPR_MACHINE) > > +#define SPAPR_MACHINE_GET_CLASS(obj) \ > > + OBJECT_GET_CLASS(sPAPRMachineClass, obj, TYPE_SPAPR_MACHINE) > > +#define SPAPR_MACHINE_CLASS(klass) \ > > + OBJECT_CLASS_CHECK(sPAPRMachineClass, klass, TYPE_SPAPR_MACHINE) > > + > > +/** > > + * sPAPRMachineClass: > > + */ > > +struct sPAPRMachineClass { > > + /*< private >*/ > > + MachineClass parent_class; > > + > > + /*< public >*/ > > +}; > > =20 > > /** > > * sPAPRMachineState: >=20 > Reviewed-by: Thomas Huth Thanks for the review. I've fixed the nit you pointer out in 2/4, and merged into spapr-next. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVZ8J7AAoJEGw4ysog2bOSyxoQAOILpLNjq8/r3ghFkowNt7RI KSJeFk6XGyAMJKiXxum/igWZbU6J1NDU4nsY8Mr1B0CQ0GlnIHTwS1JZYS3phzYn iBVhmoYrXmb/kMLSowG7BuqV1MD4Yf8h6+wDlmvT/PPOQLCzsh7TSL2JwQMV15nb r3TsSIm1OPKlCHYIoysFn82WuTxisbIZiyln8PaJGO3gVXMQUk4JGXxOjdDBifk7 xZVcJ70xCkjaQSBZcQWdcM/VygT5zHp6lLvz7L92LItfCchE7F2b5EOghuSHRAmb mzQcqTXdnUFaZRyxD9YrdSpdHitjUi4f59sqSjD75xHkknYbeoGWiAcoZV4suIfn xMd2HwTWLMFTz2GLtJHPIA/EMQ8qmuOGX+0u99wh/W9ARZKYJSVjvgLNP8nN/ZD+ HRxUfeo2CogCQx3aCftRK5n14KVEUx0jhkVRio9z+I3SWKe2El5i3nzmCetsNWAW 1ZLR5XjN+5MGXyFWbUzqQq45PVFK2hK7ScRzJnTGE79Zo1jpFGBadHo/ge2d4pa3 wpHp/i+OIoGNqXOhU01G4ewzYuOaJ8s2UWYezO2CuchJqL9semnAsiaAIV4CjX3/ M6fvA4xD3yCiYVYZOOr2D2OSAnjJXtBUMyNVoD/H4QmNbemGaERLqXwmGXCDLWp5 2hv3tWpyQLKyWR/hh3tJ =Irao -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO--