qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>,
	clalance@redhat.com, qemu-devel@nongnu.org,
	Cole Robinson <crobinso@redhat.com>
Subject: Re: [Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'
Date: Fri, 14 May 2010 09:22:55 -0500	[thread overview]
Message-ID: <4BED5CBF.8060505@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100514135426.GJ9282@redhat.com>

On 05/14/2010 08:54 AM, Daniel P. Berrange wrote:
> On Fri, May 14, 2010 at 08:24:09AM -0500, Anthony Liguori wrote:
>    
>> On 05/13/2010 08:07 AM, Jes Sorensen wrote:
>>      
>>> On 05/13/10 15:04, Cole Robinson wrote:
>>>
>>>        
>>>> On 05/13/2010 04:35 AM, Jes Sorensen wrote:
>>>>
>>>>          
>>>>> On 05/12/10 22:48, Cole Robinson wrote:
>>>>> I think rather than 1, it would be better to add a patch to libvirt to
>>>>> catch both formats. I know Chris Lalancette already cooked up a patch
>>>>> for this. Combined with the 2) patch I just posted, and 3) I think that
>>>>> should take care of the problems.
>>>>>
>>>>>            
>>>> It doesn't solve the problem for existing libvirt installations. It's
>>>> not uncommon for users to track just the latest kvm releases without
>>>> upgrading libvirt: any future qemu or kvm release will break every
>>>> version of libvirt that exists today. Given that unfortunate case, I
>>>> still recommend reverting the 'PC' change at least for long enough for a
>>>> few fixed libvirt releases to make it into the wild.
>>>>
>>>>          
>>> But that is no different from what we have today. Users who update their
>>> qemu and see issues with libvirt can also be asked to update libvirt. I
>>> have already had several cases where I needed to do that anyway.
>>>
>>> I don't like reverting a change like this, just to schedule it to be
>>> reapplied again later.
>>>
>>>        
>> The problem is, we've been down this road many times before.  Every
>> time, the libvirt folks say they just need this one change for
>> compatibility and keep on using the help output.  I understand that
>> that's the easiest thing to do so we need to make it easier for them to
>> do the right thing (which probably means making it harder to do the
>> wrong thing :-)).
>>
>> So I'm willing to apply this patch but only as part of a larger series
>> that eliminates the need for libvirt to parse help output.  The
>> important question is then, what information is libvirt getting from the
>> help output today.
>>      
> The short answer is we extract:
>
>   - QEMU version number
>   - KVM version number (if present)
>   - Probe for specific named arguments (-drive, -chardev, -device,
>     and many many more)
>    

This can be tied to version number, no?

>   - Probe for named flags (eg cache= option to -drive which appeared
>     after the initial -drive arg did)
>    

Again, this ought to be able to be tied to version number, no?

Regards,

Anthony Liguori

> Things we use the QEMU/KVM version number for:
>
>   - Track changes in syntax of an existing arg. eg -vnc changed
>     syntax between 0.8.x and 0.9.0
>   - Determine if we can use VNET_HDR flag
>   - Which migration protocols are available (tcp, unix, exec, fd)
>   - Whether we can use JSON mode monitor yet
>   - Override use of -netdev - even though its detected in -help
>     output for 0.12, we can't use it since there was no equivalent
>     netdev_add command for hotplug. So we have to blacklist it till
>     0.13
>
> In the ideal world we'd never do anything based off version number,
> everything would have some clear functional capability that could
> be queried. We'd then only need to use version to blacklist features
> we detect, but can't use for some reason.
>
> If you want the gory details, the key method is qemudComputeCmdFlag()
> in source code at line 1124:
>
>    http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/qemu/qemu_conf.c;h=5fa8c0aa1867e1f67153d72c5b37ba09157c968e;hb=HEAD
>
> This is where we detect each feature we care about in -help output
>
>
> Regards,
> Daniel
>    

  reply	other threads:[~2010-05-14 14:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 20:29 [Qemu-devel] [PATCH] Revive -version 'QEMU PC Emulator...' Cole Robinson
2010-05-12 20:38 ` [Qemu-devel] " Jes Sorensen
2010-05-12 20:48   ` Cole Robinson
2010-05-13  8:35     ` Jes Sorensen
2010-05-13 13:04       ` Cole Robinson
2010-05-13 13:07         ` Jes Sorensen
2010-05-13 13:21           ` Daniel P. Berrange
2010-05-13 13:38             ` Luiz Capitulino
2010-05-13 14:00             ` Paul Brook
2010-05-13 19:20               ` Blue Swirl
2010-05-13 21:24                 ` Stuart Brady
2010-05-14 13:24           ` Anthony Liguori
2010-05-14 13:54             ` Daniel P. Berrange
2010-05-14 14:22               ` Anthony Liguori [this message]
2010-05-14 14:42                 ` Daniel P. Berrange
2010-05-14 14:52                   ` Anthony Liguori
2010-05-14 15:02                     ` Daniel P. Berrange
2010-05-14 15:08                       ` Anthony Liguori
2010-05-14 13:17     ` Anthony Liguori
2010-05-14 13:25       ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BED5CBF.8060505@linux.vnet.ibm.com \
    --to=aliguori@linux.vnet.ibm.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=berrange@redhat.com \
    --cc=clalance@redhat.com \
    --cc=crobinso@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).