Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-07 Thread Arnd Bergmann
On Tuesday 07 June 2011 01:04:40 Chris Metcalf wrote: For context, the most recent patch for the tile driver in question is here: https://patchwork.kernel.org/patch/843892/ On 6/6/2011 5:23 PM, Konrad Rzeszutek Wilk wrote: On Mon, Jun 06, 2011 at 05:01:36PM -0400, Chris Metcalf wrote:

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-07 Thread Chris Metcalf
On 6/7/2011 3:08 AM, Arnd Bergmann wrote: On Tuesday 07 June 2011 01:04:40 Chris Metcalf wrote: There is certainly precedent for drivers that don't fit cleanly into an existing category to go in drivers/arch, e.g. drivers/s390, drivers/parisc, etc. There is also drivers/platform/x86, though

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-07 Thread Timur Tabi
Arnd Bergmann wrote: For the spi flash driver that goes through the hypervisor abstraction, I think drivers/virt/tile would be better than driver/platform/tile, but we should really have a new abstract flash character driver subsystem for that. Why should it matter that the SPI flash driver

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-07 Thread Arnd Bergmann
On Tuesday 07 June 2011 18:49:02 Chris Metcalf wrote: You can probably argue that the tile drivers do fit in here as long as they are specific to the hypervisor and not to some SOC specific hardware. Can you clarify that? I think you're contrasting something like an ARM core that was

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-07 Thread Arnd Bergmann
On Tuesday 07 June 2011 21:20:50 Timur Tabi wrote: Arnd Bergmann wrote: For the spi flash driver that goes through the hypervisor abstraction, I think drivers/virt/tile would be better than driver/platform/tile, but we should really have a new abstract flash character driver subsystem for

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Arnd Bergmann
On Friday 03 June 2011, Timur Tabi wrote: Arnd Bergmann wrote: I don't think it's correct to think of a hypervisor as firmware, so I don't think drivers/firmware is better. I'm not sure that creating virt/fsl and putting the driver in there is a good idea, because it will

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Timur Tabi
Arnd Bergmann wrote: Sorry, I misread your first sentence above. I thought you said that you prefer drivers/firmware over virt/fsl. drivers/misc is definitely the wrong place for this, please choose a better one. Maybe drivers/virt/ ? I'll be more than happy to go with the consensus, but I

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Arnd Bergmann
On Friday 03 June 2011, Scott Wood wrote: On Fri, 3 Jun 2011 17:28:43 +0200 Arnd Bergmann a...@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

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Arnd Bergmann
On Monday 06 June 2011, Timur Tabi wrote: Arnd Bergmann wrote: Sorry, I misread your first sentence above. I thought you said that you prefer drivers/firmware over virt/fsl. drivers/misc is definitely the wrong place for this, please choose a better one. Maybe drivers/virt/ ? I'll be

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Timur Tabi
Arnd Bergmann wrote: When we talked about the situation of drivers/misc and drivers/char at one of the recent conferences, a broad consensus was that they are in need of a maintainer, which I foolishly signed up for. Deepak wanted to send an update to the MAINTAINERS file for this (I guess I

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Arnd Bergmann
On Monday 06 June 2011, Timur Tabi wrote: Arnd Bergmann wrote: When we talked about the situation of drivers/misc and drivers/char at one of the recent conferences, a broad consensus was that they are in need of a maintainer, which I foolishly signed up for. Deepak wanted to send an

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Timur Tabi
Arnd Bergmann wrote: I have no doubt that more of these will come. Chris Metcalf is currently looking for a home for his tilera hypervisor drivers, and we have the microsoft hyperv drivers in drivers/staging, so they will hopefully move to a proper place later. We also have similar drivers in

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Scott Wood
On Mon, 6 Jun 2011 17:53:09 +0200 Arnd Bergmann a...@arndb.de wrote: On Friday 03 June 2011, Scott Wood wrote: On Fri, 3 Jun 2011 17:28:43 +0200 Arnd Bergmann a...@arndb.de wrote: On Thursday 02 June 2011, Scott Wood wrote: I wanted to have the hypervisor take an update dtb (we

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Arnd Bergmann
On Monday 06 June 2011 20:15:16 Scott Wood wrote: On Mon, 6 Jun 2011 17:53:09 +0200 Arnd Bergmann a...@arndb.de wrote: 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

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Chris Metcalf
On 6/6/2011 12:24 PM, Arnd Bergmann wrote: On Monday 06 June 2011, Timur Tabi wrote:. And what about my concern that my driver will be the only one in drivers/virt? I have no doubt that more of these will come. Chris Metcalf is currently looking for a home for his tilera hypervisor drivers,

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Konrad Rzeszutek Wilk
On Mon, Jun 06, 2011 at 05:01:36PM -0400, Chris Metcalf wrote: On 6/6/2011 12:24 PM, Arnd Bergmann wrote: On Monday 06 June 2011, Timur Tabi wrote:. And what about my concern that my driver will be the only one in drivers/virt? I have no doubt that more of these will come. Chris Metcalf

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-06 Thread Chris Metcalf
For context, the most recent patch for the tile driver in question is here: https://patchwork.kernel.org/patch/843892/ On 6/6/2011 5:23 PM, Konrad Rzeszutek Wilk wrote: On Mon, Jun 06, 2011 at 05:01:36PM -0400, Chris Metcalf wrote: On 6/6/2011 12:24 PM, Arnd Bergmann wrote: On Monday 06 June

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-03 Thread Timur Tabi
Arnd Bergmann wrote: For an ioctl, please follow the normal pattern of defining a separate structure for each case, no union. You can use a void __user * in the common ioctl function, and pass that to the typed argument list in the specific functions. I have a GPL question. This header

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-03 Thread Arnd Bergmann
On Friday 03 June 2011, Timur Tabi wrote: Arnd Bergmann wrote: For an ioctl, please follow the normal pattern of defining a separate structure for each case, no union. You can use a void __user * in the common ioctl function, and pass that to the typed argument list in the specific

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-03 Thread Arnd Bergmann
On Thursday 02 June 2011, Timur Tabi wrote: Arnd Bergmann wrote: I think drivers/misc is not the right place for this, but I'm not completely sure what is. drivers/firmware would be better at least, but virt/fsl might also be ok. I don't think it's correct to think of a hypervisor as

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-03 Thread Timur Tabi
Arnd Bergmann wrote: I don't think it's correct to think of a hypervisor as firmware, so I don't think drivers/firmware is better. I'm not sure that creating virt/fsl and putting the driver in there is a good idea, because it will be the only driver in that directory. Unlike KVM,

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-03 Thread Arnd Bergmann
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

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-03 Thread Scott Wood
On Fri, 3 Jun 2011 17:28:43 +0200 Arnd Bergmann a...@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

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-02 Thread Timur Tabi
Arnd Bergmann wrote: I think drivers/misc is not the right place for this, but I'm not completely sure what is. drivers/firmware would be better at least, but virt/fsl might also be ok. I don't think it's correct to think of a hypervisor as firmware, so I don't think drivers/firmware is

[PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-01 Thread Timur Tabi
The Freescale hypervisor management driver provides several services to drivers and applications related to the Freescale hypervisor: 1. An ioctl interface for querying and managing partitions 2. A file interface to reading incoming doorbells 3. An interrupt handler for shutting down the

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-01 Thread Alan Cox
O +/* One partition must be local, the other must be remote. In other +words, if source and target are both -1, or are both not -1, then +return an error. */ + if ((param.source == -1) == (param.target == -1)) + return -EINVAL; Excess brackets (I just

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-01 Thread Timur Tabi
Alan Cox wrote: O + /* One partition must be local, the other must be remote. In other + words, if source and target are both -1, or are both not -1, then + return an error. */ +if ((param.source == -1) == (param.target == -1)) +return -EINVAL; Excess brackets

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-01 Thread Alan Cox
On Wed, 1 Jun 2011 15:24:51 -0500 Timur Tabi ti...@freescale.com wrote: Alan Cox wrote: O +/* One partition must be local, the other must be remote. In other + words, if source and target are both -1, or are both not -1, then + return an error. */ + if ((param.source

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-01 Thread Scott Wood
On Wed, 1 Jun 2011 20:46:18 +0100 Alan Cox a...@lxorguk.ukuu.org.uk wrote: +static char *strdup_from_user(const char __user *ustr, size_t max) +{ + size_t len; + char *str; + + len = strnlen_user(ustr, max); + if (len max) + return ERR_PTR(-ENAMETOOLONG); if

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-01 Thread Arnd Bergmann
On Wednesday 01 June 2011, Timur Tabi wrote: The Freescale hypervisor management driver provides several services to drivers and applications related to the Freescale hypervisor: 1. An ioctl interface for querying and managing partitions 2. A file interface to reading incoming doorbells

Re: [PATCH 7/7] [v2] drivers/misc: introduce Freescale hypervisor management driver

2011-06-01 Thread Scott Wood
On Wed, 1 Jun 2011 23:40:14 +0200 Arnd Bergmann a...@arndb.de wrote: +static long ioctl_dtprop(struct fsl_hv_ioctl_prop __user *p, int set) +{ + struct fsl_hv_ioctl_prop param; + char __user *upath, *upropname; + void __user *upropval; + char *path = NULL, *propname = NULL;