From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAok1-0004YJ-7K for qemu-devel@nongnu.org; Sun, 20 Dec 2015 19:54:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAojz-0000qQ-UE for qemu-devel@nongnu.org; Sun, 20 Dec 2015 19:54:21 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:58320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAojz-0000px-2B for qemu-devel@nongnu.org; Sun, 20 Dec 2015 19:54:19 -0500 Date: Mon, 21 Dec 2015 11:21:56 +1100 From: David Gibson Message-ID: <20151221002156.GO3011@voom.redhat.com> References: <1450423803-12839-1-git-send-email-shmulik.ladkani@ravellosystems.com> <1450423803-12839-2-git-send-email-shmulik.ladkani@ravellosystems.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rQ7Ovc9/RBrrr0/1" Content-Disposition: inline In-Reply-To: <1450423803-12839-2-git-send-email-shmulik.ladkani@ravellosystems.com> Subject: Re: [Qemu-devel] [PATCH 1/2] compat: Introduce HW_COMPAT_2_5 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shmulik Ladkani Cc: Jason Wang , idan.brown@ravellosystems.com, qemu-devel@nongnu.org, Dmitry Fleytman , Cornelia Huck , Paolo Bonzini --rQ7Ovc9/RBrrr0/1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 18, 2015 at 09:30:02AM +0200, Shmulik Ladkani wrote: > Introduce the place-holder for 2.5 back-compat properties, and the > accompanying PC_COMPAT_2_5, CCW_COMPAT_2_5, SPAPR_COMPAT_2_5. >=20 > Signed-off-by: Shmulik Ladkani spapr part Acked-by: David Gibson > --- > hw/i386/pc_piix.c | 1 + > hw/i386/pc_q35.c | 1 + > hw/ppc/spapr.c | 9 +++++++++ > hw/s390x/s390-virtio-ccw.c | 9 +++++++++ > include/hw/compat.h | 3 +++ > include/hw/i386/pc.h | 4 ++++ > 6 files changed, 27 insertions(+) >=20 > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > index 319497e..f34b0fd 100644 > --- a/hw/i386/pc_piix.c > +++ b/hw/i386/pc_piix.c > @@ -475,6 +475,7 @@ static void pc_i440fx_2_5_machine_options(MachineClas= s *m) > pc_i440fx_machine_options(m); > m->alias =3D "pc"; > m->is_default =3D 1; > + SET_MACHINE_COMPAT(m, PC_COMPAT_2_5); > } > =20 > DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", NULL, > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c > index 9a12068..b3585e0 100644 > --- a/hw/i386/pc_q35.c > +++ b/hw/i386/pc_q35.c > @@ -374,6 +374,7 @@ static void pc_q35_2_5_machine_options(MachineClass *= m) > { > pc_q35_machine_options(m); > m->alias =3D "q35"; > + SET_MACHINE_COMPAT(m, PC_COMPAT_2_5); > } > =20 > DEFINE_Q35_MACHINE(v2_5, "pc-q35-2.5", NULL, > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 6bfb908..6a0bfd7 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -2298,7 +2298,11 @@ static const TypeInfo spapr_machine_info =3D { > }, > }; > =20 > +#define SPAPR_COMPAT_2_5 \ > + HW_COMPAT_2_5 > + > #define SPAPR_COMPAT_2_4 \ > + SPAPR_COMPAT_2_5 \ > HW_COMPAT_2_4 > =20 > #define SPAPR_COMPAT_2_3 \ > @@ -2434,6 +2438,10 @@ static const TypeInfo spapr_machine_2_4_info =3D { > =20 > static void spapr_machine_2_5_class_init(ObjectClass *oc, void *data) > { > + static GlobalProperty compat_props[] =3D { > + SPAPR_COMPAT_2_5 > + { /* end of list */ } > + }; > MachineClass *mc =3D MACHINE_CLASS(oc); > sPAPRMachineClass *smc =3D SPAPR_MACHINE_CLASS(oc); > =20 > @@ -2442,6 +2450,7 @@ static void spapr_machine_2_5_class_init(ObjectClas= s *oc, void *data) > mc->alias =3D "pseries"; > mc->is_default =3D 1; > smc->dr_lmb_enabled =3D true; > + mc->compat_props =3D compat_props; > } > =20 > static const TypeInfo spapr_machine_2_5_info =3D { > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index 5a52ff2..3d79654 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -235,7 +235,11 @@ static const TypeInfo ccw_machine_info =3D { > }, > }; > =20 > +#define CCW_COMPAT_2_5 \ > + HW_COMPAT_2_5 > + > #define CCW_COMPAT_2_4 \ > + CCW_COMPAT_2_5 \ > HW_COMPAT_2_4 \ > {\ > .driver =3D TYPE_S390_SKEYS,\ > @@ -296,10 +300,15 @@ static const TypeInfo ccw_machine_2_4_info =3D { > static void ccw_machine_2_5_class_init(ObjectClass *oc, void *data) > { > MachineClass *mc =3D MACHINE_CLASS(oc); > + static GlobalProperty compat_props[] =3D { > + CCW_COMPAT_2_5 > + { /* end of list */ } > + }; > =20 > mc->alias =3D "s390-ccw-virtio"; > mc->desc =3D "VirtIO-ccw based S390 machine v2.5"; > mc->is_default =3D 1; > + mc->compat_props =3D compat_props; > } > =20 > static const TypeInfo ccw_machine_2_5_info =3D { > diff --git a/include/hw/compat.h b/include/hw/compat.h > index bcb36ef..3aa35c9 100644 > --- a/include/hw/compat.h > +++ b/include/hw/compat.h > @@ -1,6 +1,9 @@ > #ifndef HW_COMPAT_H > #define HW_COMPAT_H > =20 > +#define HW_COMPAT_2_5 \ > + /* empty */ > + > #define HW_COMPAT_2_4 \ > {\ > .driver =3D "virtio-blk-device",\ > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > index 4bf4faf..3b445e4 100644 > --- a/include/hw/i386/pc.h > +++ b/include/hw/i386/pc.h > @@ -309,7 +309,11 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t); > int e820_get_num_entries(void); > bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); > =20 > +#define PC_COMPAT_2_5 \ > + HW_COMPAT_2_5 > + > #define PC_COMPAT_2_4 \ > + PC_COMPAT_2_5 \ > HW_COMPAT_2_4 \ > {\ > .driver =3D "Haswell-" TYPE_X86_CPU,\ --=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 --rQ7Ovc9/RBrrr0/1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWd0YkAAoJEGw4ysog2bOSKx8P/3mTJsfAH0tjQuH/8/DVDl5V ndmPPkFP9oOPke771g5nfFRUX+A1hBxOMCXh/HsEaWT3+9AqFT6alq8CqbMf+Ne7 zcnCmdizDsGOtbZDsSdHg+N6FTXFoEnkW07kPMfKGDIGePAlsOrgBQxY3mffy8DJ vf0G8IISEBgWU3WhudHJ1cj3MfjP+M7Cj4dGlaeQbhilcG12jvyIo9vZrkKFmMeM nCpi6LRRTUzAKJlBt4l5M73QuXGuKqfiu9lbABNscGEkqVgVD20VXeMVDcFFqx9s BXASBt5hJPUYawak3CRmr91v2ZlSQKDR0yDEUg/adOOeHIzCp/O8V1N/jHQv596x WCF1KScaUthIlli6rxPkPtVpzXwBJxvhr3T4UCS0y9A1iIM9k9tJUWIqieO/44rp doB+dErU5r0f15P/2bJdykpHvNW0YmiVR539ZF3mztgfnffWw8pcotu6MLpoyYqX J7+nWYe7Of9STCjCyQBkKmDYaOTHtO5Eki+zTKJtroaRnXbQ6Aj6zVddFL2prOqW GA6MWkd7KDZ+exfRPCjkOV490EwbjMQMd6bXjnOMomeEkgyOoi9UGlyTrqmQQs9m fMwRsXhhSDy+ePT/7uJ7Lcbv5EAhrrTeYadY8cnA7BMBMtb+AY/hZYOP4xKT6P/4 Dt5J4+DEWlnQqnjdnJsS =FPfU -----END PGP SIGNATURE----- --rQ7Ovc9/RBrrr0/1--