On Fri, Nov 11, 2016 at 01:17:44PM +0100, Jiri Denemark wrote: > On Tue, Nov 08, 2016 at 08:29:41 +0100, Markus Armbruster wrote: > > Eduardo Habkost <ehabkost@xxxxxxxxxx> writes: > > > libvirt wants to know if the QEMU binary supports a given -cpu > > > option (normally CPU features that can be enabled/disabled using > > > "+foo"/"-foo"). > > > > The obvious way to check whether a specific CPU supports it is to > > introspect that CPU. > > > > The obvious way to check whether all CPUs of interest support it > > (assuming that is a productive question) is to introspect all CPUs of > > interest. Works regardless of whether the option is inherited, which is > > really an implementation detail. > > As Eduardo said, libvirt wants to know whether it can use a given CPU > feature with current QEMU binary. In -cpu help, we can see a list of > models and features QEMU understands, but we need to get similar info > via QMP. CPU models are easy, but how do we get the list of CPU > features? If introspection is the way to get it, I'm fine with that, > just beware that we don't actually know the name of the CPU object > (Westmere-x86_64-cpu), we only know the name of the CPU model > (Westmere). So if the object name is needed, we need to query the > mapping from CPU model names to CPU object names. I have patches to add the QOM type name to query-cpu-definitions. I don't remember if I submitted them to qemu-devel already. I will check. -- Eduardo -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list