All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Juergen Gross <jgross@suse.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tools: fix xen-detect to correctly identify domU type
Date: Tue, 29 Mar 2016 14:54:31 +0100	[thread overview]
Message-ID: <56FA8917.50705@citrix.com> (raw)
In-Reply-To: <56F4FCBF.3060606@suse.com>

On 25/03/16 08:54, Juergen Gross wrote:
> On 24/03/16 12:38, George Dunlap wrote:
>> On Thu, Mar 24, 2016 at 11:23 AM, Andrew Cooper
>> <andrew.cooper3@citrix.com> wrote:
>>> On 24/03/16 10:58, Juergen Gross wrote:
>>>> I've searched a little bit in git history in order to understand why
>>>> xen-detect has been invented and/or has all the options which clearly
>>>> are meant to be used in scripts.
>>>>
>>>> The last large modification was done in 2009 and I think Konrad is to
>>>> blame here. ;-)
>>>>
>>>> It was meant to be used in early boot sequence to autoload the needed
>>>> modules (frontends/backends) in case of running on top of Xen. I believe
>>>> this usage isn't needed any longer as the dom0 case is handled
>>>> differently and the needed frontends are loaded automatically on demand.
>>>>
>>>> So this means we can drop all the options of xen-detect, as they serve
>>>> no purpose today.
>>>>
>>>> Next question is whether the remaining functionality warrants keeping
>>>> xen-detect, and how the information it is presenting can be obtained.
>>>>
>>>> If we want to keep it, I can think of following solutions:
>>>> - new kernel ABI (as suggested, David doesn't like it)
>>>> - follow the route it is taking today, information is unreliable
>>>> - parsing of the boot messages (e.g. via an init script into a file)
>>>>   and printing that information (would work, but is a little bit hacky)
>>>>
>>>> Thoughts?
>>>
>>> I don't recommend keeping xen-detect.  It is unreliable, and we will
>>> always be playing catchup.
>>>
>>> Parsing? that's not a little hacky...  The ABI is definitely a better
>>> solution.
>>>
>>> As for the ABI,
>>>
>>> [root@fusebot ~]# find /sys/hypervisor/
>>> /sys/hypervisor/
>>> /sys/hypervisor/type
>>> /sys/hypervisor/uuid
>>> /sys/hypervisor/compilation
>>> /sys/hypervisor/compilation/compiled_by
>>> /sys/hypervisor/compilation/compile_date
>>> /sys/hypervisor/compilation/compiler
>>> /sys/hypervisor/properties
>>> /sys/hypervisor/properties/pagesize
>>> /sys/hypervisor/properties/changeset
>>> /sys/hypervisor/properties/virtual_start
>>> /sys/hypervisor/properties/features
>>> /sys/hypervisor/properties/capabilities
>>> /sys/hypervisor/version
>>> /sys/hypervisor/version/extra
>>> /sys/hypervisor/version/major
>>> /sys/hypervisor/version/minor
>>>
>>> A /sys/hypervisor/guest_type property would fit nicely alongside uuid,
>>> and is applicable to all hypervisors, not just Xen.
>>
>> FWIW this sounds reasonable to me.
> 
> Another sum up:
> 
> - common sense seems to be the current way xen-detect is trying to
>   guess the guest type is unreliable and should be dropped (Jan
>   would like to keep it, but I guess he just wants the information
>   to be available - is this correct, Jan?)
> - the command line options of xen-detect are not necessary any more
> - the information which guest type we are should be obtainable from
>   inside the guest, the consumer of this information should be humans
>   only
> - the OS already knows in which mode it is running, so it should be the
>   kernel to present that information (David disagrees here: he isn't
>   convinced this information is it worth to add another kernel
>   interface)
> 
> As there is no real hurry to have this topic settled I'd suggest we just
> discuss it at the Hackathon (all involved in the discussion so far but
> George will be there). What do you think?

I just signed up, so I'll be there too. :-)

So if we decide not to add a /sys/hypervisor/guest_type node, I guess
we'll probably be deleting this anyway.  The next question is, if we
*do* add such a node, will we replace xen-detect with a program that
simply reports the value of this node?  Or are we planning on deleting
it either way?

If we're planning on deleting it either way, I'd be in favor of deleting
it now, so that it can be gone from 4.7.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-03-29 13:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23  7:50 [PATCH] tools: fix xen-detect to correctly identify domU type Juergen Gross
2016-03-23  9:10 ` Jan Beulich
     [not found] ` <56F26B7C02000078000DF896@suse.com>
2016-03-23  9:19   ` Juergen Gross
2016-03-23  9:29     ` Jan Beulich
     [not found]     ` <56F26FF602000078000DF8C8@suse.com>
2016-03-23 10:14       ` Juergen Gross
2016-03-23 10:25         ` Jan Beulich
2016-03-23 10:32           ` David Vrabel
2016-03-23 10:52             ` Juergen Gross
2016-03-23 10:55               ` Andrew Cooper
2016-03-23 10:59                 ` David Vrabel
2016-03-23 11:12                   ` Andrew Cooper
2016-03-23 11:18                     ` David Vrabel
2016-03-23 11:25                       ` Andrew Cooper
2016-03-23 19:03                         ` Juergen Gross
2016-03-24 10:22                           ` David Vrabel
2016-03-24 10:58                             ` Juergen Gross
2016-03-24 11:23                               ` Andrew Cooper
2016-03-24 11:38                                 ` George Dunlap
2016-03-25  8:54                                   ` Juergen Gross
2016-03-29  6:49                                     ` Jan Beulich
2016-03-29 13:54                                     ` George Dunlap [this message]
2016-03-29 14:00                                       ` Juergen Gross
2016-03-29 14:05                                         ` George Dunlap
2016-03-23 11:33                 ` Juergen Gross
2016-03-23 12:50                   ` Boris Ostrovsky
2016-03-23 10:34           ` Andrew Cooper
2016-03-23 10:48             ` Juergen Gross
2016-03-23 10:29         ` Andrew Cooper

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=56FA8917.50705@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jgross@suse.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.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.