Re: [Qemu-devel] [PATCH v2] s390: return unavailable features via query-cpu-definitions

2017-07-03 Thread David Hildenbrand
>> Wonder if we should declare all these prototypes at the beginning of the >> file. >> > Don't know either. Looking around in QEMU, forward declarations for > static functions seem to be used sparsely (only when needed). I could > have reordered the functions to get around without forward decls

Re: [Qemu-devel] [PATCH v2] s390: return unavailable features via query-cpu-definitions

2017-07-03 Thread Viktor Mihajlovski
On 03.07.2017 11:25, David Hildenbrand wrote: > >> >> +static S390CPUModel *get_max_cpu_model(Error **errp); >> + >> #ifndef CONFIG_USER_ONLY >> +static void list_add_feat(const char *name, void *opaque); > > Wonder if we should declare all these prototypes at the beginning of the > file. >

Re: [Qemu-devel] [PATCH v2] s390: return unavailable features via query-cpu-definitions

2017-07-03 Thread David Hildenbrand
> > +static S390CPUModel *get_max_cpu_model(Error **errp); > + > #ifndef CONFIG_USER_ONLY > +static void list_add_feat(const char *name, void *opaque); Wonder if we should declare all these prototypes at the beginning of the file. > + > +static void check_unavailable_features(const

[Qemu-devel] [PATCH v2] s390: return unavailable features via query-cpu-definitions

2017-07-03 Thread Viktor Mihajlovski
The response for query-cpu-definitions didn't include the unavailable-features field, which is used by libvirt to figure out whether a certain cpu model is usable on the host. The unavailable features are now computed by obtaining the host CPU model and comparing it against the known CPU models.