2009-07-20 16:03:50

by Greg KH

[permalink] [raw]
Subject: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux


Hi all,

I'm happy to announce, that after many months of discussions, Microsoft
has released their Hyper-V Linux drivers under the GPLv2. Following
this message, will be the patches that add the drivers to the
drivers/staging/ tree, and a whole bunch of cleanups.

It's taken a long road to get here, and I'd like to thank the following
people who made this possible:
- Steve Hemminger for the initial prodding and extreme patience
- Hank Janssen for providing the code and working with me to get it
into a workable and semi-mergable state. His involvement within
Microsoft was also invaluable.
- Sam Ramji for his push within Microsoft to make this happen in a
manner that works with the Linux community.
- Novell for sponsoring my work on the Linux Driver project, without
which, this would not have even been possible.
And there are many others both within Novell and Microsoft, who I do not
want to slight by not naming, but the list would be too long to go into.

These drivers are to enable Linux to work better when running as a guest
on top of the Hyper-V system. There is still a lot of work to do in
getting this into "proper" mergable state, and moving it out of the
staging directory, but Hank and I will be undertaking this task. See
the TODO file in the drivers/staging/hv/ directory if anyone wishes to
help out with this task.

The code should be showing up in the linux-next tree soon, as the
patches are now in my public tree.

If anyone has any questions about this code, please let me and Hank know
about it.

thanks,

greg k-h


2009-07-20 16:30:06

by Greg KH

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Mon, Jul 20, 2009 at 09:00:25AM -0700, Greg Kroah-Hartman wrote:
>
> Hi all,
>
> I'm happy to announce, that after many months of discussions, Microsoft
> has released their Hyper-V Linux drivers under the GPLv2. Following
> this message, will be the patches that add the drivers to the
> drivers/staging/ tree, and a whole bunch of cleanups.

Hm, for some reason my scripts to send patches out caused them to get
eaten by the very good lkml filters. (note, it was my fault, not
lkml's).

So instead of trying to send them again, and spaming everyone who
already got them, you can find them in my staging tree at:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-05-staging/

If anyone wants me to post any of the individual 54 patches to them,
please let me know.

thanks,

greg k-h

2009-07-20 17:00:58

by Dave Jones

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Mon, Jul 20, 2009 at 09:28:10AM -0700, Greg KH wrote:
> On Mon, Jul 20, 2009 at 09:00:25AM -0700, Greg Kroah-Hartman wrote:
> >
> > Hi all,
> >
> > I'm happy to announce, that after many months of discussions, Microsoft
> > has released their Hyper-V Linux drivers under the GPLv2. Following
> > this message, will be the patches that add the drivers to the
> > drivers/staging/ tree, and a whole bunch of cleanups.
>
> Hm, for some reason my scripts to send patches out caused them to get
> eaten by the very good lkml filters. (note, it was my fault, not
> lkml's).
>
> So instead of trying to send them again, and spaming everyone who
> already got them, you can find them in my staging tree at:
> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-05-staging/
>
> If anyone wants me to post any of the individual 54 patches to them,
> please let me know.

Given the numerous cleanup patches that already exist, is there any reason
to not just post the cleaned up drivers ? It would certainly be more
reviewable than the current pile.

Come to think of it, is there any value in merging the pre-cleaned up
patches ? Why merge 54 patches to mainline when a half dozen will do ?

Dave

2009-07-20 17:06:34

by Greg KH

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Mon, Jul 20, 2009 at 12:59:41PM -0400, Dave Jones wrote:
> On Mon, Jul 20, 2009 at 09:28:10AM -0700, Greg KH wrote:
> > On Mon, Jul 20, 2009 at 09:00:25AM -0700, Greg Kroah-Hartman wrote:
> > >
> > > Hi all,
> > >
> > > I'm happy to announce, that after many months of discussions, Microsoft
> > > has released their Hyper-V Linux drivers under the GPLv2. Following
> > > this message, will be the patches that add the drivers to the
> > > drivers/staging/ tree, and a whole bunch of cleanups.
> >
> > Hm, for some reason my scripts to send patches out caused them to get
> > eaten by the very good lkml filters. (note, it was my fault, not
> > lkml's).
> >
> > So instead of trying to send them again, and spaming everyone who
> > already got them, you can find them in my staging tree at:
> > http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-05-staging/
> >
> > If anyone wants me to post any of the individual 54 patches to them,
> > please let me know.
>
> Given the numerous cleanup patches that already exist, is there any reason
> to not just post the cleaned up drivers ? It would certainly be more
> reviewable than the current pile.
>
> Come to think of it, is there any value in merging the pre-cleaned up
> patches ? Why merge 54 patches to mainline when a half dozen will do ?

It's the "normal" way of cleaning up code. Start with a known-working
piece of stuff, and incrementally clean it up. This way if I mess any
of the individual steps up, it's easy to find the problem. This has
already paid off in the past week working with the Microsoft developers
to get this into a buildable / workable state.

The code still needs lots of cleanup, and review, as is evident by the
TODO file. It looks like the patches did get sent to the driver-devel
and virtualization lists, so you can see them there if you want to.

But if you want, I can post the 4 individual drivers as of right now,
what they will show up in the linux-next tree tomorrow if you want me
to.

thanks,

greg k-h

2009-07-20 17:10:14

by Matthias Urlichs

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

Hi,

Dave Jones:
> Given the numerous cleanup patches that already exist, is there any reason
> to not just post the cleaned up drivers ? It would certainly be more
> reviewable than the current pile.
>
Feel free to apply / combinediff these patches before reviewing. :-P

Personally, I don't want to ever see another patch where substantial
changes (for some nontrivial value of "substantial") are intermixed
with distracting s/\<BOOLEAN\>/bool/g cleanups.

--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [email protected]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
v4sw7$Yhw6+8ln7ma7u7L!wl7DUi2e6t3TMWb8HAGen6g3a4s6Mr1p-3/-6 hackerkey.com
- -
You can never do merely one thing.
-- Garrett Hardin

2009-07-20 17:17:26

by Dave Jones

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Mon, Jul 20, 2009 at 07:09:11PM +0200, Matthias Urlichs wrote:
> Hi,
>
> Dave Jones:
> > Given the numerous cleanup patches that already exist, is there any reason
> > to not just post the cleaned up drivers ? It would certainly be more
> > reviewable than the current pile.
> >
> Feel free to apply / combinediff these patches before reviewing. :-P
>
> Personally, I don't want to ever see another patch where substantial
> changes (for some nontrivial value of "substantial") are intermixed
> with distracting s/\<BOOLEAN\>/bool/g cleanups.

'Substantial changes' doesn't matter when it's an initial submission.
By its nature, it's a substantial change.

Dave

2009-07-20 17:22:26

by Dave Jones

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Mon, Jul 20, 2009 at 10:03:45AM -0700, Greg KH wrote:
> The code still needs lots of cleanup, and review, as is evident by the
> TODO file. It looks like the patches did get sent to the driver-devel
> and virtualization lists, so you can see them there if you want to.
>
> But if you want, I can post the 4 individual drivers as of right now,
> what they will show up in the linux-next tree tomorrow if you want me
> to.

I already patched a copy of all 54 patches while I was waiting.
(For those playing along at home: http://codemonkey.org.uk/junk/hv.diff)

Dave

2009-07-20 17:47:55

by Greg KH

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Mon, Jul 20, 2009 at 01:15:23PM -0400, Dave Jones wrote:
> On Mon, Jul 20, 2009 at 07:09:11PM +0200, Matthias Urlichs wrote:
> > Hi,
> >
> > Dave Jones:
> > > Given the numerous cleanup patches that already exist, is there any reason
> > > to not just post the cleaned up drivers ? It would certainly be more
> > > reviewable than the current pile.
> > >
> > Feel free to apply / combinediff these patches before reviewing. :-P
> >
> > Personally, I don't want to ever see another patch where substantial
> > changes (for some nontrivial value of "substantial") are intermixed
> > with distracting s/\<BOOLEAN\>/bool/g cleanups.
>
> 'Substantial changes' doesn't matter when it's an initial submission.
> By its nature, it's a substantial change.

Note, to keep the proper authorship information, for a lot of drivers in
the staging tree, we commit the original driver with the correct Author:
and signed-off-by lines, and then we do cleanups after that to properly
attribute the developers doing that work.

thanks,

greg k-h

2009-07-20 20:00:59

by Greg KH

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Mon, Jul 20, 2009 at 09:37:12PM +0200, Andi Kleen wrote:
> Greg KH <[email protected]> writes:
> >
> > It's the "normal" way of cleaning up code. Start with a known-working
> > piece of stuff, and incrementally clean it up.
>
> I have to agree with David. This is essentially unreviewable
> in the original state. It would be good if you could
> do all the obvious cleanups first and then post a consolidated
> series.
>
> Most "obvious" cleanups should not change the binary, so
> you can easily check they are correct by comparing the assembler
> code.

Unfortunatly, some of these cleanups do change the binary, as they are
removing wrapper functions.

Anyway, I agree, for a "proper" review, I will show the final, cleaned
up version, like normal. But we aren't there just yet, that is why this
code is going to live in the staging tree for a while. Give us some
time to get it fixed up.

thanks,

greg k-h

2009-07-20 21:24:28

by Jan Engelhardt

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux


On Monday 2009-07-20 18:00, Greg Kroah-Hartman wrote:
>
>I'm happy to announce, that after many months of discussions, Microsoft
>has released their Hyper-V Linux drivers under the GPLv2. Following
>this message, will be the patches that add the drivers to the
>drivers/staging/ tree, and a whole bunch of cleanups.
>
>It's taken a long road to get here, and I'd like to thank the following
>people who made this possible:
> - Steve Hemminger for the initial prodding and extreme patience
> - Hank Janssen for providing the code and working with me to get it
> into a workable and semi-mergable state. His involvement within
> Microsoft was also invaluable.
> - Sam Ramji for his push within Microsoft to make this happen in a
> manner that works with the Linux community.
> - Novell for sponsoring my work on the Linux Driver project, without
> which, this would not have even been possible.

(Your title as Maintainer of Crap has been well earned. But crap
should not be maintained, it should be improved.)


I took a random patch to look at
(add-the-hyper-v-virtual-network-driver.patch to be precise). I think
the /hv/ subdirectory name should be expanded a little (to, say,
/hyper-v/); we're not in the Unix days anymore where space is at such
a premium that people even strip the last e off /usr. Our wireless
drivers also don't live in /wl/. And since hv does not seem to be
related to a hypervisor — cf. sunhv.c.


As for the code… I was immediately greeted by the screaming-uppercase
typedef crap jungle that is so redundant[1] yet typical in many
commercial products. One may hope that the evolution of the posted
hyper-v code brings a coding strategy breeze into the house of
Microsoft.

[1] DWORD they could have replaced by uint32_t once it became
available via C99's stdint.h. The LPCSTR crap only makes sense if you
are a lazy typist, but I would not call code doing things like LPCSTR
clean. At least it's one thing - consistent. Consistently hard to
read, though.

2009-07-20 21:35:38

by Greg KH

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Mon, Jul 20, 2009 at 11:24:24PM +0200, Jan Engelhardt wrote:
>
> On Monday 2009-07-20 18:00, Greg Kroah-Hartman wrote:
> >
> >I'm happy to announce, that after many months of discussions, Microsoft
> >has released their Hyper-V Linux drivers under the GPLv2. Following
> >this message, will be the patches that add the drivers to the
> >drivers/staging/ tree, and a whole bunch of cleanups.
> >
> >It's taken a long road to get here, and I'd like to thank the following
> >people who made this possible:
> > - Steve Hemminger for the initial prodding and extreme patience
> > - Hank Janssen for providing the code and working with me to get it
> > into a workable and semi-mergable state. His involvement within
> > Microsoft was also invaluable.
> > - Sam Ramji for his push within Microsoft to make this happen in a
> > manner that works with the Linux community.
> > - Novell for sponsoring my work on the Linux Driver project, without
> > which, this would not have even been possible.
>
> (Your title as Maintainer of Crap has been well earned. But crap
> should not be maintained, it should be improved.)

Hey, we've been working on this, if you look at the .31 merge, we got
rid of more code than we added in the staging directory, and I have a
patch to remove another driver queued up to go to Linus before the final
.31 release as well.

So don't think it's just crap coming in and nothing coming out :)

> I took a random patch to look at
> (add-the-hyper-v-virtual-network-driver.patch to be precise). I think
> the /hv/ subdirectory name should be expanded a little (to, say,
> /hyper-v/); we're not in the Unix days anymore where space is at such
> a premium that people even strip the last e off /usr. Our wireless
> drivers also don't live in /wl/. And since hv does not seem to be
> related to a hypervisor — cf. sunhv.c.

Sure, names are just names, I don't really care about this, I just
picked 'hv' as it was easy to type...

> As for the code… I was immediately greeted by the screaming-uppercase
> typedef crap jungle that is so redundant[1] yet typical in many
> commercial products. One may hope that the evolution of the posted
> hyper-v code brings a coding strategy breeze into the house of
> Microsoft.
>
> [1] DWORD they could have replaced by uint32_t once it became
> available via C99's stdint.h. The LPCSTR crap only makes sense if you
> are a lazy typist, but I would not call code doing things like LPCSTR
> clean. At least it's one thing - consistent. Consistently hard to
> read, though.

Look at the further patches in the series, I get rid of that typedef.

And yes, there's lots left to do, see the TODO file for details if you
are interested in helping out.

thanks,

greg k-h

2009-07-21 11:06:17

by Balbir Singh

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

* Greg Kroah-Hartman <[email protected]> [2009-07-20 09:00:25]:

>
> Hi all,
>
> I'm happy to announce, that after many months of discussions, Microsoft
> has released their Hyper-V Linux drivers under the GPLv2. Following
> this message, will be the patches that add the drivers to the
> drivers/staging/ tree, and a whole bunch of cleanups.
>
> It's taken a long road to get here, and I'd like to thank the following
> people who made this possible:
> - Steve Hemminger for the initial prodding and extreme patience
> - Hank Janssen for providing the code and working with me to get it
> into a workable and semi-mergable state. His involvement within
> Microsoft was also invaluable.
> - Sam Ramji for his push within Microsoft to make this happen in a
> manner that works with the Linux community.
> - Novell for sponsoring my work on the Linux Driver project, without
> which, this would not have even been possible.
> And there are many others both within Novell and Microsoft, who I do not
> want to slight by not naming, but the list would be too long to go into.
>
> These drivers are to enable Linux to work better when running as a guest
> on top of the Hyper-V system. There is still a lot of work to do in
> getting this into "proper" mergable state, and moving it out of the
> staging directory, but Hank and I will be undertaking this task. See
> the TODO file in the drivers/staging/hv/ directory if anyone wishes to
> help out with this task.
>

What is the long term strategy to keep the sources in sync? Is there
one? Do you expect to get updates for these sources?

--
Balbir

2009-07-21 12:08:06

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Monday 20 July 2009, Greg KH wrote:
> Anyway, I agree, for a "proper" review, I will show the final, cleaned
> up version, like normal. But we aren't there just yet, that is why this
> code is going to live in the staging tree for a while. Give us some
> time to get it fixed up.

I would find it helpful to have them in a git tree (or a branch) that
I can pull, so I can look at both the original code and the cleaned up
state.

Any reason why the patches are not yet in your staging.git?

Arnd <><

2009-07-21 13:38:47

by Belisko Marek

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Tue, Jul 21, 2009 at 2:07 PM, Arnd Bergmann<[email protected]> wrote:
> On Monday 20 July 2009, Greg KH wrote:
>> Anyway, I agree, for a "proper" review, I will show the final, cleaned
>> up version, like normal.  But we aren't there just yet, that is why this
>> code is going to live in the staging tree for a while.  Give us some
>> time to get it fixed up.
>
> I would find it helpful to have them in a git tree (or a branch) that
> I can pull, so I can look at both the original code and the cleaned up
> state.
You can find sources in linux-next tree in /drivers/staging/hv directory.
(git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git)
>
> Any reason why the patches are not yet in your staging.git?
>
>        Arnd <><
> _______________________________________________
> devel mailing list
> [email protected]
> http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
>

Marek

2009-07-21 16:54:48

by Greg KH

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Tue, Jul 21, 2009 at 04:36:07PM +0530, Balbir Singh wrote:
> * Greg Kroah-Hartman <[email protected]> [2009-07-20 09:00:25]:
>
> >
> > Hi all,
> >
> > I'm happy to announce, that after many months of discussions, Microsoft
> > has released their Hyper-V Linux drivers under the GPLv2. Following
> > this message, will be the patches that add the drivers to the
> > drivers/staging/ tree, and a whole bunch of cleanups.
> >
> > It's taken a long road to get here, and I'd like to thank the following
> > people who made this possible:
> > - Steve Hemminger for the initial prodding and extreme patience
> > - Hank Janssen for providing the code and working with me to get it
> > into a workable and semi-mergable state. His involvement within
> > Microsoft was also invaluable.
> > - Sam Ramji for his push within Microsoft to make this happen in a
> > manner that works with the Linux community.
> > - Novell for sponsoring my work on the Linux Driver project, without
> > which, this would not have even been possible.
> > And there are many others both within Novell and Microsoft, who I do not
> > want to slight by not naming, but the list would be too long to go into.
> >
> > These drivers are to enable Linux to work better when running as a guest
> > on top of the Hyper-V system. There is still a lot of work to do in
> > getting this into "proper" mergable state, and moving it out of the
> > staging directory, but Hank and I will be undertaking this task. See
> > the TODO file in the drivers/staging/hv/ directory if anyone wishes to
> > help out with this task.
> >
>
> What is the long term strategy to keep the sources in sync? Is there
> one? Do you expect to get updates for these sources?

The in-kernel version will be the only source for the drivers in the
long run. Eventually they will take the drivers off their web site when
the distros pick them up in their new releases.

thanks,

greg k-h

2009-07-21 16:54:55

by Greg KH

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

On Tue, Jul 21, 2009 at 02:07:40PM +0200, Arnd Bergmann wrote:
> On Monday 20 July 2009, Greg KH wrote:
> > Anyway, I agree, for a "proper" review, I will show the final, cleaned
> > up version, like normal. But we aren't there just yet, that is why this
> > code is going to live in the staging tree for a while. Give us some
> > time to get it fixed up.
>
> I would find it helpful to have them in a git tree (or a branch) that
> I can pull, so I can look at both the original code and the cleaned up
> state.
>
> Any reason why the patches are not yet in your staging.git?

staging.git is for sending patches to Linus only. Look in the
MAINTAINERS file for a location of my tree of patches for staging.

If you like git, I'd recommend just using the linux-next tree, as that
always has the latest staging patches in it.

thanks,

greg k-h

2009-07-21 18:00:19

by Hank Janssen

[permalink] [raw]
Subject: RE: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux



>What is the long term strategy to keep the sources in sync? Is there
>one? Do you expect to get updates for these sources?
>
> Balbir


Balbir,

I think you are asking me if we plan to continue contributing?

It is my plan to use the kernel as my primary development area, and I will
Continue to provide Greg with updates. First step is to clean up the code
To make sure if fulfills all Kernel coding standards and requirements.

Then I will start contributing new functionality.

Thanks,

Hank.

2009-07-21 19:17:12

by Balbir Singh

[permalink] [raw]
Subject: Re: [patch 00/54] [Announce] Microsoft Hyper-V drivers for Linux

* Hank Janssen <[email protected]> [2009-07-21 18:00:10]:

>
>
> >What is the long term strategy to keep the sources in sync? Is there
> >one? Do you expect to get updates for these sources?
> >
> > Balbir
>
>
> Balbir,
>
> I think you are asking me if we plan to continue contributing?
>
> It is my plan to use the kernel as my primary development area, and I will
> Continue to provide Greg with updates. First step is to clean up the code
> To make sure if fulfills all Kernel coding standards and requirements.
>
> Then I will start contributing new functionality.
>

Good to know. Thanks for the clarification!

--
Balbir