linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: greg@kroah.com, kumar.gala@freescale.com,
	linux-kernel@vger.kernel.org, akpm@kernel.org,
	linux-console@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver
Date: Mon, 6 Jun 2011 13:15:16 -0500	[thread overview]
Message-ID: <20110606131516.69b9f361@schlenkerla.am.freescale.net> (raw)
In-Reply-To: <201106061753.10154.arnd@arndb.de>

On Mon, 6 Jun 2011 17:53:09 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> On Friday 03 June 2011, Scott Wood wrote:
> > On Fri, 3 Jun 2011 17:28:43 +0200
> > Arnd Bergmann <arnd@arndb.de> wrote:
> > 
> > > On Thursday 02 June 2011, Scott Wood wrote:
> > > > I wanted to have the hypervisor take an update dtb (we already have special
> > > > meta-properties for things like deletion as part of the hv config
> > > > mechanism).  But others on the project wanted to keep it simple, and so
> > > > get/set property it was. :-/
> > > > 
> > > > It's unlikely to change at this point without a real need.
> > > > 
> > > > As for a filesystem interface, it's not a good match either. 
> > > > You can't iterate over anything to read out the full tree from the hv.
> > > 
> > > kexec iterates over /proc/device-tree to create a dts blob.
> > 
> > That's irrelevant, because we're not talking about that device tree.  We're
> > talking about the device tree of another hypervisor guest.
> 
> I understand that it's a different device tree. That doesn't mean we
> can't use the same tools.

The kernel does not have the same sort of access to this tree.

> > > > You can't delete anything. 
> > > 
> > > rm, rmdir
> > > 
> > > > You can't create empty nodes.
> > > 
> > > mkdir
> > 
> > I know how to operate a filesystem.  You can't do these operations *on
> > another guest's device tree through the hv interface*.
> 
> Why not?

Because the hypervisor does not support it.  It provides only getprop and
setprop.  I think you took my "you can't do that" statements to be a
statement about limitations of using a filesystem interfcae -- quite the
opposite, I was saying the hv functionality is too limited to support a
filesystem interface with normal semantics.

> > And what would be the benefit of this major restructuring and added
> > complexity?
> 
> I think it would be a slightly better abstraction, and the complexity
> is not as big as you make it sound. I'm mainly countering your statement
> that it would be a bad interface or that would not possible to do.
> 
> I'm not that opposed to having an ioctl interface for your hypervisor
> interface, but I am opposed to making design choices based on
> a bad representations of facts or not having considered the options
> that other people suggest.

I don't really see how a filesystem is a better abstraction for a wrapper
around a procedural interface.  A somewhat better argument is that ioctls
are a pain, and Linux doesn't have a better way to expose a procedural
interface, that doesn't require a wrapper program -- though as the wrapper
already exists, and the fs interface would probably be sufficiently awkward
that people would still use a wrapper, that doesn't buy us too much either.

This is not being proposed as any sort of standard kernel API, just a way
for userspace to get access to implementation-specific hcalls.
Implementation-specific backdoor is practically the definition of ioctl. :-)

I would be interested to see a concrete proposal for what this would look
like as a filesystem, though, based on the actual operations that are
available.  How would you deal with getting all the parameters in,
performing the operation, and getting the results back?  What about when
multiple processes are doing this at the same time?  What would the memcpy
hcall look like?

-Scott

  reply	other threads:[~2011-06-06 18:15 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 18:35 [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver Timur Tabi
2011-06-01 19:46 ` Alan Cox
2011-06-01 20:24   ` Timur Tabi
2011-06-01 20:34     ` Alan Cox
2011-06-01 20:54   ` Scott Wood
2011-06-01 21:45     ` Alan Cox
2011-06-01 21:40 ` Arnd Bergmann
2011-06-01 22:24   ` Scott Wood
2011-06-03 15:28     ` Arnd Bergmann
2011-06-03 16:22       ` Scott Wood
2011-06-06 15:53         ` Arnd Bergmann
2011-06-06 18:15           ` Scott Wood [this message]
2011-06-06 19:48             ` Arnd Bergmann
2011-06-02 21:28   ` Timur Tabi
2011-06-03 15:24     ` Arnd Bergmann
2011-06-03 15:28       ` Timur Tabi
2011-06-06 15:42         ` Arnd Bergmann
2011-06-06 15:48           ` Timur Tabi
2011-06-06 16:03             ` Arnd Bergmann
2011-06-06 16:09               ` Timur Tabi
2011-06-06 16:24                 ` Arnd Bergmann
2011-06-06 16:27                   ` Timur Tabi
2011-06-06 21:01                   ` Chris Metcalf
2011-06-06 21:23                     ` Konrad Rzeszutek Wilk
2011-06-06 23:04                       ` Chris Metcalf
2011-06-07  7:08                         ` Arnd Bergmann
2011-06-07 16:49                           ` Chris Metcalf
2011-06-07 19:16                             ` Arnd Bergmann
2011-06-07 19:20                               ` Timur Tabi
2011-06-07 19:34                                 ` Arnd Bergmann
2011-06-03 14:44   ` Timur Tabi
2011-06-03 15:17     ` Arnd Bergmann

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=20110606131516.69b9f361@schlenkerla.am.freescale.net \
    --to=scottwood@freescale.com \
    --cc=akpm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=greg@kroah.com \
    --cc=kumar.gala@freescale.com \
    --cc=linux-console@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=timur@freescale.com \
    /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).