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 <m...@linux.vnet.ibm.com> >> Acked-by: Christian Borntraeger <borntrae...@de.ibm.com> >> --- >> include/qom/cpu.h | 5 +++++ >> qapi-schema.json | 9 +++++++++ >> qom/cpu.c | 14 ++++++++++++++ >> 3 files changed, 28 insertions(+) >>
>> >> +# @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'] } >> + > > 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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature