On Tue, Aug 02, 2016 at 03:23:30PM +0200, David Hildenbrand wrote: [...] > > > +# > > > +# @static: #optional whether a CPU definition is static and will not > > > change > > > +# between QEMU versions / QEMU machines. A static model is > > > always > > > +# migration-safe. If not provided, information is not > > > available. > > > > I assume static models don't change depending on the > > machine-type, either. If that's case, we should document that. > > That's what I meant with "QEMU machines", should that be "QEMU machine types" > instead?
Sorry, I was reading it too quickly. You did document it. :) We could extend it to mention the other guarantees (just like my previous suggestion for CpuModelExpansionType::static): "will not change depending on QEMU version, machine type, machine options, and accelerator options". > > > > > I believe in this case we don't need to make it optional: just > > make the field always present and set it to "false" by default. > > That is true for x86, do you know about the other architectures (arm, ppc)? > I'd like to avoid returning false information here for other architectures. As being "static" is not a fact about the existing code, but just a guarantee about what the developers are going to do in the future, static=false just means that the developers didn't make any promises yet (so I don't think it would ever be false information). In other words, I believe we can safely assume a CPU model is not guaranteed to be static unless the maintainers decided to explicitly document it as static (and change the data returned by query-cpu-definitions). (I am assuming that changing it from "false" to "true" in a new QEMU version won't be a problem for anybody.) -- Eduardo