On Thu, May 23, 2019 at 10:35:24AM +0200, Andrea Bolognani wrote: > On Wed, 2019-05-15 at 13:54 +0200, Andrew Jones wrote: > > On Wed, May 15, 2019 at 12:52:29PM +0200, Igor Mammedov wrote: > > > since using magic numbers is not very descriptive > > > (but if there is some spec where they come from that we could point users > > > to > > > it might be acceptable too, but I'd reserve number approach for values > > > only). > > > > The numbers aren't magic, they're part of the name. '1' in the above > > 'sve1' means one quadword. It would probably have been better to use bits > > instead in the example, i.e. > > > > -cpu host,sve128=on,sve256=on,sve384=off,sve512=on > > > > where it's now clear that "sve512" has an analogy with x86's "avx512". > > > [...] > > > > So I set off to convince Igor of the wide word idea (he sits next to me, > > so I didn't have go far), but he has convinced me of the above property > > idea. He used the magic phrase: "less code would be needed". If we use > > the properties like above then we get introspection for free (cpu property > > listing which libvirt already knows how to do) - so no QMP query needed. > > The cost is adding several properties (16 to handle the current 2048-bit > > limit), but I guess that's cheap enough. The command line is verbose, but > > also much easier for a human to construct and read. I'm pretty sold on > > this path, but adding Andrea and Eduardo for their input as well. > > Sorry for taking a while to respond. Anyway, the above looks good to > me as a general direction, but note that you'll have to implement at > the very least the query-cpu-model-expansion QMP command for the > introspection to work.
Why is query-cpu-model-expansion needed? Isn't device-list-properties enough? > > query-cpu-model-baseline and query-cpu-model-comparison are two more > QMP command which, while perhaps not immediately applicabile, we will > want to implement at some point; more in general, what s390x is doing > with respect to CPU models is a good blueprint, according to the > libvirt developer who's the most involved with that specific area of > the project. Agreed. Even if not necessary right now, query-cpu-model-* will probably be needed eventually. -- Eduardo