[libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

Eric Blake eblake at redhat.com
Mon Apr 20 15:45:37 UTC 2015


On 04/15/2015 02:34 AM, Martin Kletzander wrote:

>> But this will break on qemu 2.3, unless something changes there.  I
>> don't want to do a version check, but I also don't want something that
>> works by accident in qemu 2.2 start failing with qemu 2.3.
>>
> 
> I'm failing to find any compromise here.  We would have to wait for
> QEMU to fix the introspection, but in the meantime we'd be unable to
> fix it ourselves.  And since 2.3 is right around the corner, we'd have
> to wait for 2.4.
> 
> Can we at least add all the patches except the hunks that set the
> capability and decide later on how to enable that, at least for any
> possible adopters to minimize their need for non-upstream patches?

I could live with a compromise patch that merges both approaches -
query-command-line-options for the qemu versions that work, and a
hard-coded version check for qemu 2.3 where it doesn't work.  That way,
if someone backports it to 2.2 (and includes as part of their backport
the gunk to get QMP command line detection working), libvirt can use it;
and when using upstream 2.3, we use it by virtue of version numbers.

It's a bit annoying that the feature is machine-specific; we have to be
careful that the hard-coded version check only enables the libvirt
capability bit on machines where it is likely to work in qemu (that is,
the reason that qemu 2.3 no longer advertises the bit is that it is not
global to all machines; so if powerpc doesn't support it, we must not
try to use the bit when targetting a powerpc qemu).


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150420/ad792193/attachment-0001.sig>


More information about the libvir-list mailing list