All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@suse.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "libvir-list@redhat.com" <libvir-list@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	Dave Scott <Dave.Scott@eu.citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxl: allow an <emulator> to be selected in the domain config XML
Date: Wed, 01 May 2013 09:40:06 -0600	[thread overview]
Message-ID: <51813756.4080007@suse.com> (raw)
In-Reply-To: <1367419979.3142.740.camel@zakaz.uk.xensource.com>

Ian Campbell wrote:
> On Wed, 2013-05-01 at 15:31 +0100, Jim Fehlig wrote:
>   
>> Ian Campbell wrote:
>>     
>>> On Wed, 2013-05-01 at 04:42 +0100, Jim Fehlig wrote:
>>>   
>>>       
>>>> David Scott wrote:
>>>>     
>>>>         
>>>>> Hi,
>>>>>
>>>>> [added xen-devel: FYI this is about how to properly set the libxl
>>>>> device_model_version when the user has provided a manual device_model
>>>>> override (aka a path to a qemu) in the libvirt domain XML.]
>>>>>
>>>>> On 30/04/13 16:10, Jim Fehlig wrote:
>>>>>       
>>>>>           
>>>>>> David Scott wrote:
>>>>>>         
>>>>>>             
>>>>>>> The emulator path supplied can be any valid path on the system.
>>>>>>>
>>>>>>> Note that when setting a device_model, libxl needs us to set the
>>>>>>> device_model_version too. The device_model_version can be either
>>>>>>>
>>>>>>>    ...QEMU_XEN: meaning "upstream qemu", the default in xen-4.3 onwards
>>>>>>>    ...QEMU_XEN_TRADITIONAL: the old xen-specific fork
>>>>>>>
>>>>>>> We detect the device_model_version by examining the qemu filename:
>>>>>>> if it is "qemu-dm" then it's the old xen-specific fork. If anything
>>>>>>> else then we assume "upstream qemu" (whose filename may change
>>>>>>> in future). Note that if you are using a wrapper script to (eg)
>>>>>>> adjust the arguments of the old qemu during development, you will
>>>>>>> have to ensure the wrapper script also has the name "qemu-dm", by
>>>>>>> placing it in a separate directory.
>>>>>>>
>>>>>>>           
>>>>>>>               
>>>>>> That is unfortunate.  Users could have existing config with
>>>>>> <emulator>/usr/bin/my-qemu-dm</emulator> which works with the legacy
>>>>>> stack but not with libxl right?  Is it possible to safely query the
>>>>>> binary to determine if it is qemu-dm?
>>>>>>         
>>>>>>             
>>>>> From my reading of libxl, it doesn't seem to have any way to detect
>>>>> the type of a given qemu binary (or at least I couldn't spot it). I
>>>>> think that if we were to write some detection code we should probably
>>>>> add it to libxl rather than libvirt -- what do you think?
>>>>>       
>>>>>           
>>>> I tend to agree.  Why should apps have to specify device_model_version? 
>>>> I think it is sufficient to say here's an emulator, please use it.
>>>>     
>>>>         
>>> The intended usage model is the other way around, we expect normal users
>>> to just ask for a specific device model version and for them not to care
>>> about the specific path to the device model binary.
>>>   
>>>       
>> That doesn't seem right to me.  In a few years time who will care about
>> "qemu-traditional" at all?
>>     
>
> People who installed Windows with it and are therefore stuck with it for
> the lifetime of the VM. We expect it to eventually go away but not as
> quickly as you might expect, for this reason.
>   

These people should use <emulator>/usr/lib/xen/bin/qemu-dm</emulator> IMO.

>   
>>   Seems more useful for me to be able to say
>> use '/usr/bin/qemu-system-i386', '/usr/bin/qemu-system-arm',
>> '/usr/lib/xen/bin/qemu-dm', '/usr/local/bin/qemu-add-my-args', etc.  And
>> if I don't specify an emulator, then pick a sane default.
>>     
>
> This is still all advanced usage, the majority of users should specify
> neither the version nor the path, libxl will just do the right thing for
> them. If the libvirt bindings is trying to insert a path in the "pick a
> sane default" case then it should stop trying to do this and just let
> libxl DTRT.
>   

Yes, I agree.  But if a user specifies <emulator>/bla/bla</emulator>,
how should libvirt populate device_model_version?  Is it expected that
qemu-xen-traditional will always be the 0.10.2 version?  If so, libxl
could DTRT by setting device_model_version to qemu-xen-traditional when
detecting the the requested emulator version in 0.10.2.

> BTW "qemu-add-my-args" can be achieved via the libxl API which has a
> field for extra arguments to pass the device model.
>   

Good to know, thanks.

Regards,
Jim

> [...]
>   
>>> I would suggest that libvirt+libxl expose the version as the "emulator"
>>> option and not the path.
>>>       
>> That doesn't fit well with the <emulator> documentation
>>     
>
> That's a shame.
>
>   
>> |emulator|
>> ||
>> ||The contents of the |emulator| element specify the fully qualified
>> path to the device model emulator binary.  The capabilities XML
>> specifies the recommended default emulator to use for each particular
>> domain type / architecture combination.
>>     
>
> Ian
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
>   

  parent reply	other threads:[~2013-05-01 15:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1367319679-32126-1-git-send-email-dave.scott@eu.citrix.com>
     [not found] ` <517FDEDD.7080603@suse.com>
2013-04-30 19:51   ` [PATCH] libxl: allow an <emulator> to be selected in the domain config XML David Scott
     [not found]   ` <518020B7.2000700@eu.citrix.com>
2013-05-01  3:42     ` Jim Fehlig
     [not found]     ` <51808F43.5090909@suse.com>
2013-05-01  7:59       ` Daniel P. Berrange
2013-05-01  8:46       ` Ian Campbell
     [not found]       ` <1367397985.3142.632.camel@zakaz.uk.xensource.com>
2013-05-01 13:44         ` David Scott
     [not found]         ` <51811C2B.3030802@eu.citrix.com>
2013-05-01 14:11           ` Daniel P. Berrange
     [not found]           ` <20130501141134.GH13875@redhat.com>
2013-05-25 20:11             ` [libvirt] " Marek Marczykowski
     [not found]             ` <51A11AF1.8040509@invisiblethingslab.com>
2013-05-30 17:53               ` Jim Fehlig
     [not found]               ` <51A791FF.5030503@suse.com>
2013-05-31  8:25                 ` Ian Campbell
     [not found]                 ` <1369988727.5199.24.camel@zakaz.uk.xensource.com>
2013-05-31 10:46                   ` Marek Marczykowski
     [not found]                   ` <51A87F9A.6000106@invisiblethingslab.com>
2013-05-31 10:55                     ` Ian Campbell
     [not found]                     ` <1369997753.5199.81.camel@zakaz.uk.xensource.com>
2013-05-31 11:14                       ` Marek Marczykowski
     [not found]                       ` <51A88627.70004@invisiblethingslab.com>
2013-05-31 11:50                         ` Ian Campbell
2013-05-31 15:34                     ` Jim Fehlig
2013-05-01 14:31         ` Jim Fehlig
     [not found]         ` <51812744.7090400@suse.com>
2013-05-01 14:52           ` Ian Campbell
     [not found]           ` <1367419979.3142.740.camel@zakaz.uk.xensource.com>
2013-05-01 15:40             ` Jim Fehlig [this message]
2013-05-01 15:47               ` Ian Campbell

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=51813756.4080007@suse.com \
    --to=jfehlig@suse.com \
    --cc=Dave.Scott@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=berrange@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.