[libvirt] handle different version of QEMU

Eric Blake eblake at redhat.com
Tue Aug 5 16:57:20 UTC 2014


On 08/05/2014 10:14 AM, Matthias Gatto wrote:
> Hello,
> 
> I'm implementing the "new" QEMU option of
> block_set_io_throttle(@bps_max, @bps_rd_max...), but i have a problem:
> The old version of QEMU(before 1.7) does not handle it, so I'd like to
> know what function should i use to know the version of QEMU, and
> what's the proper way to handle this problem ?

Look at src/qemu/qemu_capabilities.c for how we discover other
capabilities. You'll have to find some way to force QMP introspection to
reveal whether you are dealing with old or new qemu.  Are you targetting
a new command line option (look at virQEMUCapsCommandLine) or a new QMP
command (look at virQEMUCapsCommands), or new optional arguments to
existing QMP commands (tougher, since QMP doesn't necessarily have
introspection yet) or something else?  I'm not quite clear based on your
description what you are trying to add support for.

-- 
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: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140805/ccff3520/attachment-0001.sig>


More information about the libvir-list mailing list