From: Avi Kivity <avi@redhat.com> To: Alexander Graf <agraf@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org>, Ingo Molnar <mingo@elte.hu>, "linux-kernel@vger.kernel.org List" <linux-kernel@vger.kernel.org>, "kvm@vger.kernel.org list" <kvm@vger.kernel.org>, qemu-devel Developers <qemu-devel@nongnu.org>, Pekka Enberg <penberg@kernel.org> Subject: Re: [PATCH] KVM: Add wrapper script around Qemu to test kernels Date: Wed, 24 Aug 2011 11:25:52 +0300 [thread overview] Message-ID: <4E54B590.9040408@redhat.com> (raw) In-Reply-To: <1314137806-5747-1-git-send-email-agraf@suse.de> On 08/24/2011 01:16 AM, Alexander Graf wrote: > On LinuxCon I had a nice chat with Linus on what he thinks kvm-tool > would be doing and what he expects from it. Basically he wants a > small and simple tool he and other developers can run to try out and > see if the kernel they just built actually works. > > Fortunately, Qemu can do that today already! The only piece that was > missing was the "simple" piece of the equation, so here is a script > that wraps around Qemu and executes a kernel you just built. > > If you do have KVM around and are not cross-compiling, it will use > KVM. But if you don't, you can still fall back to emulation mode and > at least check if your kernel still does what you expect. I only > implemented support for s390x and ppc there, but it's easily extensible > to more platforms, as Qemu can emulate (and virtualize) pretty much > any platform out there. > > If you don't have qemu installed, please do so before using this script. Your > distro should provide a package for it (might even call it "kvm"). If not, > just compile it from source - it's not hard! > > To quickly get going, just execute the following as user: > > $ ./Documentation/run-qemu.sh -r / -a init=/bin/bash > > This will drop you into a shell on your rootfs. > > Happy hacking! > > + > +function has_config() { > + grep "CONFIG_$1=y" .config > +} grep -q ? > + case "$1" in > + -a|--append) > + KERNEL_APPEND2="$2" Might want to append to KERNEL_APPEND2, so you could have multiple -a args. > +echo " > + ################# Linux Qemu launcher ################# > + > +This script executes your currently built Linux kernel using Qemu. If KVM is > +available, it will also use KVM for fast virtualization of your guest. > + > +The intent is to make it very easy to run your kernel. If you need to do more > +advanced things, such as passing through real devices, please take the command > +line shown below and modify it to your needs. This tool is for simplicity, not > +world dominating functionality coverage. Device assignment could be useful for driver developers, yes. > +" > +echo "\ > +Your guest is bound to the current foreground shell. To quit the guest, > +please use Ctrl-A x" > +echo " Executing: $QEMU_BIN $QEMU_OPTIONS -append \"$KERNEL_APPEND\" -smp $SMP" > +echo > + > +exec $QEMU_BIN $QEMU_OPTIONS -append "$KERNEL_APPEND -smp $SMP" Would be nice to support launching gdb in a separate terminal with vmlinux already loaded, and already attached to qemu. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com> To: Alexander Graf <agraf@suse.de> Cc: "kvm@vger.kernel.org list" <kvm@vger.kernel.org>, "linux-kernel@vger.kernel.org List" <linux-kernel@vger.kernel.org>, qemu-devel Developers <qemu-devel@nongnu.org>, Pekka Enberg <penberg@kernel.org>, Linus Torvalds <torvalds@linux-foundation.org> Subject: Re: [Qemu-devel] [PATCH] KVM: Add wrapper script around Qemu to test kernels Date: Wed, 24 Aug 2011 11:25:52 +0300 [thread overview] Message-ID: <4E54B590.9040408@redhat.com> (raw) In-Reply-To: <1314137806-5747-1-git-send-email-agraf@suse.de> On 08/24/2011 01:16 AM, Alexander Graf wrote: > On LinuxCon I had a nice chat with Linus on what he thinks kvm-tool > would be doing and what he expects from it. Basically he wants a > small and simple tool he and other developers can run to try out and > see if the kernel they just built actually works. > > Fortunately, Qemu can do that today already! The only piece that was > missing was the "simple" piece of the equation, so here is a script > that wraps around Qemu and executes a kernel you just built. > > If you do have KVM around and are not cross-compiling, it will use > KVM. But if you don't, you can still fall back to emulation mode and > at least check if your kernel still does what you expect. I only > implemented support for s390x and ppc there, but it's easily extensible > to more platforms, as Qemu can emulate (and virtualize) pretty much > any platform out there. > > If you don't have qemu installed, please do so before using this script. Your > distro should provide a package for it (might even call it "kvm"). If not, > just compile it from source - it's not hard! > > To quickly get going, just execute the following as user: > > $ ./Documentation/run-qemu.sh -r / -a init=/bin/bash > > This will drop you into a shell on your rootfs. > > Happy hacking! > > + > +function has_config() { > + grep "CONFIG_$1=y" .config > +} grep -q ? > + case "$1" in > + -a|--append) > + KERNEL_APPEND2="$2" Might want to append to KERNEL_APPEND2, so you could have multiple -a args. > +echo " > + ################# Linux Qemu launcher ################# > + > +This script executes your currently built Linux kernel using Qemu. If KVM is > +available, it will also use KVM for fast virtualization of your guest. > + > +The intent is to make it very easy to run your kernel. If you need to do more > +advanced things, such as passing through real devices, please take the command > +line shown below and modify it to your needs. This tool is for simplicity, not > +world dominating functionality coverage. Device assignment could be useful for driver developers, yes. > +" > +echo "\ > +Your guest is bound to the current foreground shell. To quit the guest, > +please use Ctrl-A x" > +echo " Executing: $QEMU_BIN $QEMU_OPTIONS -append \"$KERNEL_APPEND\" -smp $SMP" > +echo > + > +exec $QEMU_BIN $QEMU_OPTIONS -append "$KERNEL_APPEND -smp $SMP" Would be nice to support launching gdb in a separate terminal with vmlinux already loaded, and already attached to qemu. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
next prev parent reply other threads:[~2011-08-24 8:26 UTC|newest] Thread overview: 191+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-08-23 22:16 [PATCH] KVM: Add wrapper script around Qemu to test kernels Alexander Graf 2011-08-23 22:16 ` [Qemu-devel] " Alexander Graf 2011-08-23 22:16 ` Alexander Graf 2011-08-24 5:19 ` Pekka Enberg 2011-08-24 5:19 ` [Qemu-devel] " Pekka Enberg 2011-08-24 5:19 ` Pekka Enberg 2011-08-24 5:31 ` Américo Wang 2011-08-24 5:31 ` [Qemu-devel] " Américo Wang 2011-08-24 5:31 ` Américo Wang 2011-08-24 20:35 ` Alexander Graf 2011-08-24 20:35 ` [Qemu-devel] " Alexander Graf 2011-08-24 20:35 ` Alexander Graf 2011-08-25 3:44 ` Américo Wang 2011-08-25 3:44 ` [Qemu-devel] " Américo Wang 2011-08-25 3:44 ` Américo Wang 2011-11-05 23:47 ` Alexander Graf 2011-11-05 23:47 ` [Qemu-devel] " Alexander Graf 2011-11-05 23:47 ` Alexander Graf 2011-08-24 8:25 ` Avi Kivity [this message] 2011-08-24 8:25 ` [Qemu-devel] " Avi Kivity 2011-08-24 9:16 ` Jan Kiszka 2011-08-24 9:16 ` [Qemu-devel] " Jan Kiszka 2011-08-24 21:06 ` Alexander Graf 2011-08-24 21:06 ` [Qemu-devel] " Alexander Graf 2011-08-24 21:06 ` Alexander Graf 2011-08-24 17:40 ` [Qemu-devel] " Blue Swirl 2011-08-24 17:40 ` Blue Swirl 2011-08-24 19:17 ` Avi Kivity 2011-08-24 19:17 ` Avi Kivity 2011-08-24 19:17 ` Avi Kivity 2011-08-24 21:17 ` [Qemu-devel] " Alexander Graf 2011-08-24 21:17 ` Alexander Graf 2011-08-24 21:38 [PATCH] KVM: Add wrapper script around QEMU " Alexander Graf 2011-08-24 21:38 ` Alexander Graf 2011-08-25 18:01 ` [Qemu-devel] " Blue Swirl 2011-11-06 0:03 ` Alexander Graf 2011-11-06 13:54 ` Jan Kiszka 2012-05-11 13:42 ` Alexander Graf 2012-05-11 14:05 ` Jan Kiszka 2012-05-11 14:05 ` Jan Kiszka 2011-11-06 1:35 Alexander Graf 2011-11-06 1:35 ` Alexander Graf 2011-11-06 10:04 ` Pekka Enberg 2011-11-06 10:04 ` Pekka Enberg 2011-11-06 10:07 ` Avi Kivity 2011-11-06 10:07 ` Avi Kivity 2011-11-06 10:12 ` Pekka Enberg 2011-11-06 10:12 ` Pekka Enberg 2011-11-06 10:23 ` Avi Kivity 2011-11-06 10:23 ` Avi Kivity 2011-11-06 11:08 ` Pekka Enberg 2011-11-06 11:08 ` Pekka Enberg 2011-11-06 11:50 ` Avi Kivity 2011-11-06 11:50 ` Avi Kivity 2011-11-06 12:14 ` Pekka Enberg 2011-11-06 12:14 ` Pekka Enberg 2011-11-06 12:27 ` Avi Kivity 2011-11-06 12:27 ` Avi Kivity 2011-11-06 12:32 ` Pekka Enberg 2011-11-06 12:32 ` Pekka Enberg 2011-11-06 12:43 ` Avi Kivity 2011-11-06 12:43 ` Avi Kivity 2011-11-06 13:06 ` Pekka Enberg 2011-11-06 13:06 ` Pekka Enberg 2011-11-06 15:56 ` Avi Kivity 2011-11-06 15:56 ` Avi Kivity 2011-11-06 16:35 ` Pekka Enberg 2011-11-06 16:35 ` Pekka Enberg 2011-11-06 16:50 ` Avi Kivity 2011-11-06 17:08 ` Anthony Liguori 2011-11-06 18:09 ` Pekka Enberg 2011-11-07 1:38 ` Anthony Liguori 2011-11-06 18:31 ` [Qemu-devel] " Ted Ts'o 2011-11-06 18:54 ` Pekka Enberg 2011-11-06 18:58 ` Pekka Enberg 2011-11-06 23:19 ` Ted Ts'o 2011-11-07 6:42 ` Pekka Enberg 2011-11-07 17:03 ` Vince Weaver 2011-11-07 17:59 ` [Qemu-devel] " Ingo Molnar 2011-11-07 20:03 ` Frank Ch. Eigler 2011-11-07 20:09 ` Pekka Enberg 2011-11-08 5:29 ` [Qemu-devel] " Vince Weaver 2011-11-08 12:07 ` Ingo Molnar 2011-11-08 13:08 ` Arnaldo Carvalho de Melo 2011-11-09 6:04 ` Vince Weaver 2011-11-07 19:53 ` [Qemu-devel] " Pekka Enberg 2011-11-07 20:32 ` Ted Ts'o 2011-11-07 21:36 ` [Qemu-devel] " Pekka Enberg 2011-11-07 22:19 ` Anthony Liguori 2011-11-07 23:42 ` Theodore Tso 2011-11-07 10:31 ` Kevin Wolf 2011-11-07 11:38 ` Pekka Enberg 2011-11-07 11:59 ` Kevin Wolf 2011-11-06 16:19 ` Jan Kiszka 2011-11-06 16:30 ` Pekka Enberg 2011-11-06 16:30 ` Pekka Enberg 2011-11-06 16:39 ` Jan Kiszka 2011-11-06 16:39 ` Jan Kiszka 2011-11-06 17:11 ` Pekka Enberg 2011-11-06 17:11 ` Pekka Enberg 2011-11-06 17:23 ` Jan Kiszka 2011-11-06 17:23 ` Jan Kiszka 2011-11-06 17:55 ` Pekka Enberg 2011-11-06 17:55 ` Pekka Enberg 2011-11-06 16:39 ` Pekka Enberg 2011-11-06 16:39 ` Pekka Enberg 2011-11-07 10:11 ` Gerd Hoffmann 2011-11-07 10:11 ` Gerd Hoffmann 2011-11-07 10:18 ` Pekka Enberg 2011-11-06 17:10 ` Anthony Liguori 2011-11-06 17:15 ` Alexander Graf 2011-11-06 17:15 ` Alexander Graf 2011-11-06 17:28 ` Pekka Enberg 2011-11-06 17:28 ` Pekka Enberg 2011-11-06 17:30 ` Alexander Graf 2011-11-06 17:30 ` Alexander Graf 2011-11-06 18:05 ` Pekka Enberg 2011-11-06 18:05 ` Pekka Enberg 2011-11-06 19:14 ` Paolo Bonzini 2011-11-06 19:14 ` Paolo Bonzini 2011-11-06 19:19 ` Pekka Enberg 2011-11-06 19:19 ` Pekka Enberg 2011-11-06 22:08 ` Frank Ch. Eigler 2011-11-06 22:08 ` Frank Ch. Eigler 2011-11-07 6:58 ` Pekka Enberg 2011-11-07 6:58 ` Pekka Enberg 2011-11-06 19:11 ` Paolo Bonzini 2011-11-06 19:11 ` Paolo Bonzini 2011-11-06 19:17 ` Pekka Enberg 2011-11-06 20:01 ` Paolo Bonzini 2011-11-06 20:01 ` Paolo Bonzini 2011-11-06 20:17 ` Pekka Enberg 2011-11-06 20:17 ` Pekka Enberg 2011-11-07 8:00 ` Paolo Bonzini 2011-11-07 8:00 ` Paolo Bonzini 2011-11-07 8:09 ` Pekka Enberg 2011-11-07 8:09 ` Pekka Enberg 2011-11-07 8:20 ` Paolo Bonzini 2011-11-07 8:20 ` Paolo Bonzini 2011-11-07 8:45 ` Pekka Enberg 2011-11-07 8:45 ` Pekka Enberg 2011-11-07 8:52 ` Paolo Bonzini 2011-11-07 8:52 ` Paolo Bonzini 2011-11-07 8:57 ` Pekka Enberg 2011-11-07 8:57 ` Pekka Enberg 2011-11-07 8:13 ` Pekka Enberg 2011-11-07 8:13 ` Pekka Enberg 2011-11-06 20:31 ` Pekka Enberg 2011-11-06 20:31 ` Pekka Enberg 2011-11-07 10:23 ` Gerd Hoffmann 2011-11-07 10:23 ` Gerd Hoffmann 2011-11-07 10:30 ` Sasha Levin 2011-11-07 11:02 ` Paolo Bonzini 2011-11-07 11:02 ` Paolo Bonzini 2011-11-07 11:44 ` Pekka Enberg 2011-11-07 11:44 ` Pekka Enberg 2011-11-07 12:18 ` Gerd Hoffmann 2011-11-07 12:18 ` Gerd Hoffmann 2011-11-07 12:21 ` Pekka Enberg 2011-11-07 12:21 ` Pekka Enberg 2011-11-07 12:26 ` Avi Kivity 2011-11-07 12:29 ` Pekka Enberg 2011-11-07 12:43 ` Ted Ts'o 2011-11-07 12:44 ` Avi Kivity 2011-11-07 11:34 ` Pekka Enberg 2011-11-07 11:57 ` Ingo Molnar 2011-11-07 11:57 ` Ingo Molnar 2011-11-07 12:08 ` Gerd Hoffmann 2011-11-07 12:29 ` Ted Ts'o 2011-11-07 12:42 ` Pekka Enberg 2011-11-07 12:42 ` Pekka Enberg 2011-11-07 12:47 ` Ted Ts'o 2011-11-07 12:47 ` Ted Ts'o 2011-11-07 12:59 ` Pekka Enberg 2011-11-07 12:59 ` Pekka Enberg 2011-11-07 13:12 ` Pekka Enberg 2011-11-07 13:12 ` Pekka Enberg 2011-11-08 13:29 ` Karel Zak 2011-11-08 14:30 ` Pekka Enberg 2011-11-08 14:30 ` Pekka Enberg 2011-11-06 13:11 ` Pekka Enberg 2011-11-06 13:11 ` Pekka Enberg 2011-11-06 17:09 ` Alexander Graf 2011-11-06 12:27 ` Pekka Enberg 2011-11-06 12:27 ` Pekka Enberg 2011-11-08 14:41 ` Avi Kivity 2011-11-08 14:52 ` Christoph Hellwig 2011-11-08 14:55 ` Sasha Levin 2011-11-08 14:55 ` Sasha Levin 2011-11-08 14:57 ` Avi Kivity 2011-11-08 14:57 ` Avi Kivity 2011-11-08 14:59 ` Christoph Hellwig 2011-11-08 17:34 ` Alexander Graf 2011-11-08 17:36 ` Avi Kivity 2011-11-08 15:04 ` Jan Kiszka 2011-11-08 15:26 ` Pekka Enberg 2011-11-08 15:26 ` Pekka Enberg 2011-11-08 15:28 ` Christoph Hellwig 2011-11-07 14:34 青云 2012-05-11 15:46 Alexander Graf
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=4E54B590.9040408@redhat.com \ --to=avi@redhat.com \ --cc=agraf@suse.de \ --cc=kvm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@elte.hu \ --cc=penberg@kernel.org \ --cc=qemu-devel@nongnu.org \ --cc=torvalds@linux-foundation.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: linkBe 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.