Re: [PATCH v1] qemu: command: rework cpu feature argument support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CCing qemu-devel.

CCing Markus, in case he has any insights about the interface
introspection.

On Tue, Nov 15, 2016 at 08:42:12AM +0100, Jiri Denemark wrote:
> On Mon, Nov 14, 2016 at 18:02:29 -0200, Eduardo Habkost wrote:
> > On Mon, Nov 14, 2016 at 02:26:03PM -0500, Collin L. Walling wrote:
> > > cpu features are passed to the qemu command with feature=on/off
> > > instead of +/-feature.
> > > 
> > > Signed-off-by: Collin L. Walling <walling@xxxxxxxxxxxxxxxxxx>
> > 
> > If I'm not mistaken, the "feature=on|off" syntax was added on
> > QEMU 2.0.0. Does current libvirt support older QEMU versions?
> 
> Of course it does. I'd love to switch to feature=on|off, but how can we
> check if QEMU supports it? We can't really start using this syntax
> without it.

Actually, I was wrong, this was added in v2.4.0. "feat=on|off"
needs two things to work (in x86):

* Translation of all "foo=bar" options to QOM property setting.
  This was added in v2.0.0-rc0~162^2
* The actual QOM properties for feature names to be present. They
  were added in v2.4.0-rc0~101^2~1

So you can be sure "feat=on" is supported by checking if the
feature flags are present in device-list-properties output for
the CPU model. But device-list-properties is also messy[1].

Maybe we can use the availability of query-cpu-model-expansion to
check if we can safely use the new "feat=on|off" system? It's
easier than taking all the variables above into account.

---

[1] * device-list-properties support for x86 CPU QOM classes
      will be in QEMU 2.8.
    * device-list-properties on x86 CPU QOM classes returns
      an error on QEMU 2.5-2.7.
    * device-list-properties on x86 CPU classes may crash QEMU in
      QEMU older than 2.5 (see commit 4c315c27).
  But:
    * query-cpu-definitions will probably return the CPU QOM
      typename in QEMU 2.9+ only.


-- 
Eduardo

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]