On Thu, Sep 09, 2021 at 12:35:12PM +0100, Richard W.M. Jones wrote: > On Thu, Sep 09, 2021 at 01:11:09PM +0200, Laszlo Ersek wrote: > > How does libguestfs deal with different QEMU versions / QEMU feature > > deprecation? Is there some kind of feature detection? > > Kind of, but it's only grepping the output of -help, -device \?, > and/or looking at QMP output of "query-qmp-schema" and "query-kvm". > > The code is in: > > https://github.com/libguestfs/libguestfs/blob/master/lib/qemu.c > > As qemu has settled down over time and libguestfs uses only a > well-established set of features, this kind of feature detection has > become less and less interesting. (So quite unlike libvirt where > they're always trying to catch up with the latest qemu features). At > some point we might just say "use qemu >= VERSION" and have done with it. > > > For example, why would it be less good to implement the change as follows: > > > > if (g->verbose) { > > if (guestfs_int_qemu_supports_device(...) { > > arg ("-device", "sga"); > > } else { > > #if defined(__i386__) || defined(__x86_64__) > > arg ("-machine", "graphics=off"); > > #endif > > } > > I think in this case it's my understanding that the "new" (from RHEL 7!) > seabios graphics feature is just better than SGA, and so we might as > well use it all the time even if SGA is available. That was my > understanding from talking to Gerd anyhow.
IIUC, functionally they should be no difference. The "better" comes from the seabios impl being written in C while the sgabios impl is 2500 lines of asm :-) Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| _______________________________________________ Libguestfs mailing list [email protected] https://listman.redhat.com/mailman/listinfo/libguestfs
