Re: [git pull] lguest: paravirt boot code

Previous thread: Re: [PATCH] Add bluetooth support to toshiba-acpi driver by Andrey Borzenkov on Sunday, October 21, 2007 - 10:30 pm. (2 messages)

Next thread: [PATCH] Include kernel/Kconfig.instrumentation in i386 and x86-64 Kconfig. by Soeren Sandmann on Sunday, October 21, 2007 - 10:44 pm. (1 message)
To: Linus Torvalds <torvalds@...>
Cc: <linux-kernel@...>, lguest <lguest@...>, <virtualization@...>, Jeremy Fitzhardinge <jeremy@...>, H. Peter Anvin <hpa@...>
Date: Sunday, October 21, 2007 - 10:37 pm

Hi Linus,

First attempt at git, so please pull carefully. I've just put the
three i386 boot changes in the repo for the moment. If this works I'll pile
on the 44 lguest patches.

git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest.git

Documentation/i386/boot.txt | 34 +++++++++++++++++++++++++++-
arch/x86/boot/compressed/head_32.S | 15 ++++++++++-
arch/x86/boot/compressed/misc_32.c | 3 ++
arch/x86/boot/header.S | 7 +++++-
arch/x86/kernel/asm-offsets_32.c | 7 +++++
arch/x86/kernel/head_32.S | 44 +++++++++++++++++++++++++++++++++--
include/asm-x86/bootparam.h | 9 +++++-
include/linux/linkage.h | 6 +++++
8 files changed, 116 insertions(+), 9 deletions(-)

commit f160a3a39ba7a5ac03a0eb64c25d3751c342e0e7
Author: Jeremy Fitzhardinge <jeremy@xensource.com>
Date: Mon Oct 22 10:56:19 2007 +1000

i386: paravirt boot sequence

This patch uses the updated boot protocol to do paravirtualized boot.
If the boot version is >= 2.07, then it will do two things:

1. Check the bootparams loadflags to see if we should reload the
segment registers and clear interrupts. This is appropriate
for normal native boot and some paravirtualized environments, but
inapproprate for others.

2. Check the hardware architecture, and dispatch to the appropriate
kernel entrypoint. If the bootloader doesn't set this, then we
simply do the normal boot sequence.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>

commit a706681568ed19f147ab78674388c5a0e6ab8c44
Author: Jeremy Fitzhardinge <jeremy@xensource.com>
Date:...

To: Rusty Russell <rusty@...>
Cc: <linux-kernel@...>, lguest <lguest@...>, <virtualization@...>, Jeremy Fitzhardinge <jeremy@...>, H. Peter Anvin <hpa@...>
Date: Monday, October 22, 2007 - 10:28 pm

Well, it looked ok, but I had already merged the same patches through
Andrew, so when I pulled, I had no differences. So I ended up unpulling,
but not because there was anything *wrong* with your tree, just because
the pull didn't give me anything but a slightly more complex history ;)

Linus
-

To: Linus Torvalds <torvalds@...>
Cc: <linux-kernel@...>, lguest <lguest@...>, <virtualization@...>, Jeremy Fitzhardinge <jeremy@...>, H. Peter Anvin <hpa@...>
Date: Tuesday, October 23, 2007 - 2:03 am

Well, with that out the way, and some scatterlist fixups, please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest.git

This should be fairly clean: 45 lguest patches including the more generic
drivers (aimed to be used by KVM as well, and hopefully others) and the start
of separation of arch-specific from general lguest code.

Documentation/lguest/Makefile | 26 +-
Documentation/lguest/lguest.c | 1629 ++++++++++++++++++---------------
Documentation/lguest/lguest.txt | 72 +-
arch/i386/Kconfig | 32 +-
arch/i386/Makefile | 3 +
arch/x86/kernel/asm-offsets_32.c | 1 +
arch/x86/lguest/Kconfig | 14 +
arch/x86/lguest/Makefile | 1 +
arch/x86/lguest/boot.c | 1070 ++++++++++++++++++++++
arch/x86/lguest/i386_head.S | 115 +++
arch/x86/xen/Kconfig | 5 +-
drivers/Kconfig | 2 +-
drivers/Makefile | 1 +
drivers/block/Kconfig | 6 +
drivers/block/Makefile | 2 +-
drivers/block/lguest_blk.c | 421 ---------
drivers/block/virtio_blk.c | 308 +++++++
drivers/char/Kconfig | 4 +
drivers/char/Makefile | 2 +-
drivers/char/hvc_lguest.c | 177 ----
drivers/char/virtio_console.c | 225 +++++
drivers/kvm/Kconfig | 4 +
drivers/lguest/Kconfig | 13 +-
drivers/lguest/Makefile | 10 +-
drivers/lguest/core.c | 568 +-----------
drivers/lguest/hypercalls.c | 177 ++---
drivers/lguest/interrupts_and_traps.c | 125 ++-
drivers/lguest/io.c | 626 -------------
drivers/lguest/lg.h | 189 ++---
drivers/lguest/lguest.c | 1108 ----------------------
drivers/lguest/lguest_asm.S | 93 --
drivers/lguest/lg...

To: Rusty Russell <rusty@...>
Cc: <linux-kernel@...>, lguest <lguest@...>, <virtualization@...>, Jeremy Fitzhardinge <jeremy@...>, H. Peter Anvin <hpa@...>
Date: Tuesday, October 23, 2007 - 12:10 pm

Ok. However, please include a proper diffstat. And by proper, I mean:

git diff -M --stat --summary

because right now your diffstat doesn't contain the final "total number of
lines added/removed" (which is the easiest way for me to see that there
isn't anything strange in there), and your diffstat doesn't do renames, so

but in reality it was not at all thousands of lines changed, but instead a
rename with much smaller changes:

drivers/lguest/lguest.c => arch/x86/lguest/boot.c | 102 +-

which is a lot more readable and tells me much more about what is going
on.

And at the end, I really do want to see the details like this:

70 files changed, 4822 insertions(+), 4401 deletions(-)
create mode 100644 arch/x86/lguest/Kconfig
create mode 100644 arch/x86/lguest/Makefile
rename drivers/lguest/lguest.c => arch/x86/lguest/boot.c (93%)
rename drivers/lguest/lguest_asm.S => arch/x86/lguest/i386_head.S (73%)
delete mode 100644 drivers/block/lguest_blk.c
create mode 100644 drivers/block/virtio_blk.c
delete mode 100644 drivers/char/hvc_lguest.c
create mode 100644 drivers/char/virtio_console.c
delete mode 100644 drivers/lguest/io.c
delete mode 100644 drivers/lguest/lguest_bus.c
create mode 100644 drivers/lguest/lguest_device.c
create mode 100644 drivers/lguest/x86/core.c
rename drivers/lguest/{switcher.S => x86/switcher_32.S} (99%)
delete mode 100644 drivers/net/lguest_net.c
create mode 100644 drivers/net/virtio_net.c
create mode 100644 drivers/virtio/Kconfig
create mode 100644 drivers/virtio/Makefile
create mode 100644 drivers/virtio/config.c
create mode 100644 drivers/virtio/virtio.c
create mode 100644 drivers/virtio/virtio_ring.c
create mode 100644 include/asm-x86/lguest.h
create mode 100644 include/asm-x86/lguest_hcall.h
delete mode 100644 include/linux/lguest_bus.h
create mode 100644 include/linux/virtio.h
create mode 100644 include/linux/virtio_blk.h
create mode 100644 include/linux/virtio_config...

To: Linus Torvalds <torvalds@...>
Cc: <linux-kernel@...>, lguest <lguest@...>, <virtualization@...>, Jeff Garzik <jeff@...>
Date: Thursday, October 25, 2007 - 1:19 am

Thanks, that is much better. I was just happy to locate git diff in the 133
git commands on my system; finding options 4, 8 and 22 was beyond my skill.

So, this time for sure! I haven't figured out how everyone does those neat
committer: commits* lists, but I'm sure there's an option here somewhere...

Please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest.git

Rusty Russell - lguest: documentation update
Rusty Russell - lguest: Add to maintainers file.
Jeff Garzik - lguest: build fix
Rusty Russell - lguest: clean up lguest_launcher.h
Rusty Russell - lguest: remove unused "wake" element from struct lguest
Rusty Russell - lguest: use defines from x86 headers instead of magic numbers
Rusty Russell - lguest: example launcher header cleanup.

Without the documentation update (which only changes comments and whitespace),
the diff looks like this:

Documentation/lguest/lguest.c | 23 +++++++++++------------
MAINTAINERS | 7 +++++++
arch/x86/lguest/boot.c | 6 +++---
drivers/lguest/lg.h | 3 ---
drivers/lguest/x86/core.c | 2 +-
include/linux/lguest_launcher.h | 18 ++++--------------
6 files changed, 26 insertions(+), 33 deletions(-)

Including the documentation update, it looks scarier:

Documentation/lguest/lguest.c | 178 +++++++++++++++++++-------------
MAINTAINERS | 7 ++
arch/x86/lguest/boot.c | 54 +++++-----
arch/x86/lguest/i386_head.S | 8 +-
drivers/lguest/core.c | 5 +-
drivers/lguest/hypercalls.c | 11 +-
drivers/lguest/interrupts_and_traps.c | 37 ++++++--
drivers/lguest/lg.h | 7 +-
drivers/lguest/lguest_device.c | 11 ++-
drivers/lguest/lguest_user.c | 23 ++--
drivers/lguest/page_tables.c | 113 +++++++++++++--------
drivers/lguest/segments.c | 48 ++++++----
drivers/lguest/x86/core.c...

To: Rusty Russell <rusty@...>
Cc: <linux-kernel@...>, lguest <lguest@...>, <virtualization@...>, Jeff Garzik <jeff@...>
Date: Thursday, October 25, 2007 - 6:41 pm

Hey, we give you the power. Actually realizing it all and getting used to
it may take some time. In the meantime, you can use the pre-canned helper
functions and just cut-and-paste from emails ;)

One of the 133 git commands is actually "git request-pull" that does this
all for you. I always forget it, because I don't use it myself, and quite
frankly, it's just a shell-script helper to do this all for you. But if
you're into that kind of thing, you can actually read that shell-script
(and others) and learn more that way ;)

Linus
-

To: Rusty Russell <rusty@...>
Cc: Linus Torvalds <torvalds@...>, <linux-kernel@...>, lguest <lguest@...>, <virtualization@...>, Jeff Garzik <jeff@...>
Date: Thursday, October 25, 2007 - 2:31 am

On Thu, 25 Oct 2007 15:19:05 +1000 Rusty Russell <rusty@rustcorp.com.au> wr=
..

try "git request-pull ..."

--=20
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

To: Rusty Russell <rusty@...>
Cc: Linus Torvalds <torvalds@...>, <linux-kernel@...>, lguest <lguest@...>, <virtualization@...>, Jeremy Fitzhardinge <jeremy@...>, H. Peter Anvin <hpa@...>
Date: Tuesday, October 23, 2007 - 4:37 pm

Also, please add a "lguest: " prefix to all future commits.

Otherwise, in the one-line summary, it is impossible to tell what
portion of the kernel is being updated:

Use "struct boot_params" in example launcher
Loading bzImage directly.
Rename "cr3" to "gpgdir" to avoid x86-specific naming.
Pagetables to use normal kernel types
Move register setup into i386_core.c
Accept elf files that are valid but have sections that can not
be mmap'ed for some reason.

git tools are all keyed to use that first line as a summary of the
changeset, without giving any other context whatsoever. See Linus's
2.6.X-rcY announcements, for example.

This is also described in akpm's
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt or my
http://linux.yyz.us/patch-format.html

Jeff

-

To: <virtualization@...>
Cc: Rusty Russell <rusty@...>, Linus Torvalds <torvalds@...>, lguest <lguest@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Tuesday, October 23, 2007 - 2:55 am

Having virtio in Linus tree would make my life easier wiring it up for
virtualization on s390.

For all virtio patches:

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>

That reminds me that I promised Rusty to look at one small issue in virtio
net driver. Nothing that should hold of the merge. I will sent the patch via
Rusty when its ready.
-

To: Christian Borntraeger <borntraeger@...>
Cc: <virtualization@...>, Linus Torvalds <torvalds@...>, lguest <lguest@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Tuesday, October 23, 2007 - 3:44 am

Indeed. And given lguest's lack of interface guarantees, it make sense to use
it as the first virtio guinea pig. I expect changes as we adapt it for

Thanks,
Rusty.
-

Previous thread: Re: [PATCH] Add bluetooth support to toshiba-acpi driver by Andrey Borzenkov on Sunday, October 21, 2007 - 10:30 pm. (2 messages)

Next thread: [PATCH] Include kernel/Kconfig.instrumentation in i386 and x86-64 Kconfig. by Soeren Sandmann on Sunday, October 21, 2007 - 10:44 pm. (1 message)