From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypdxs-0005NR-Ag for qemu-devel@nongnu.org; Tue, 05 May 2015 10:36:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ypdxo-0005xE-Si for qemu-devel@nongnu.org; Tue, 05 May 2015 10:36:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypdxo-0005x3-HK for qemu-devel@nongnu.org; Tue, 05 May 2015 10:36:48 -0400 Message-ID: <5548D57D.7020307@redhat.com> Date: Tue, 05 May 2015 08:36:45 -0600 From: Eric Blake MIME-Version: 1.0 References: <1430146411-34632-1-git-send-email-mimu@linux.vnet.ibm.com> <1430146411-34632-3-git-send-email-mimu@linux.vnet.ibm.com> <20150505132602.GQ17796@thinpad.lan.raisama.net> In-Reply-To: <20150505132602.GQ17796@thinpad.lan.raisama.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="X95If6IOvALtOiFjIqXsrvboK5xSj2elE" Subject: Re: [Qemu-devel] [PATCH v6 02/17] Add accelerator id and model name to CPUState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , Michael Mueller Cc: Cornelia Huck , Gleb Natapov , qemu-devel@nongnu.org, Alexander Graf , Christian Borntraeger , "Jason J. Herne" , Daniel Hansel , Paolo Bonzini , Andreas Faerber , Richard Henderson This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --X95If6IOvALtOiFjIqXsrvboK5xSj2elE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/05/2015 07:26 AM, Eduardo Habkost wrote: > On Mon, Apr 27, 2015 at 04:53:16PM +0200, Michael Mueller wrote: >> The patch defines ids per accelerator and adds the accel_id and >> the model_name to the CPUState. The accel_id is initialized by >> common code, the model name needs to be initialized by target >> specific code. >> >> Signed-off-by: Michael Mueller >> Acked-by: Christian Borntraeger >> --- >> include/qom/cpu.h | 5 +++++ >> qapi-schema.json | 9 +++++++++ >> qom/cpu.c | 14 ++++++++++++++ >> 3 files changed, 28 insertions(+) >> >> =20 >> +# @AccelId >> +# >> +# Defines accelerator ids >> +# >> +# Since: 2.4 Might be nice to document the possible values, but not a show-stopper if you don't. >> +## >> +{ 'enum': 'AccelId', >> + 'data': ['qtest', 'tcg', 'kvm', 'xen'] } >> + >=20 > Not sure if it is better to have an enum or simply a string here. enum is almost always better when there is a finite set of possible strings - it's better documented, and when introspection is in place, will make it easier to determine when the set has grown. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --X95If6IOvALtOiFjIqXsrvboK5xSj2elE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVSNV+AAoJEKeha0olJ0NqUowH/RXscVErTilPiSEgYQbXRUP4 W+aMCp/RGiFJJnInWqaDJy+YBUh1123ZO7ZS3n1rJduPj/pl3agDilph1UuJiqz+ 15V799S/gXNseunX+8g6ZOglN68f8K0lKQqYstSEIUwKzjQLbEGW67KubnFawdpB wjsBex4NdtDP9YQwm0X9YJLr/oyOSYqgXO5g8dVo/7jLC+G++IhZsJaX1wKeL5YY SLHsBBGosYuGADboaFYBciE8qOLNhl/a4Z5G8rEwrKmHwUKwa3dZWrsuW6n+eThi hh6RjwCRKHH4abNF4ZZRxCHR2p/cTWuuYzABLc+c2ZfcuHWvpSXraVmQkfT9fKg= =pIDM -----END PGP SIGNATURE----- --X95If6IOvALtOiFjIqXsrvboK5xSj2elE--