All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: Add wrapper script around QEMU to test kernels
@ 2011-11-06  1:35 ` Alexander Graf
  0 siblings, 0 replies; 447+ messages in thread
From: Alexander Graf @ 2011-11-06  1:35 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ingo Molnar, Avi Kivity, linux-kernel@vger.kernel.org List,
	kvm@vger.kernel.org list, qemu-devel Developers, Pekka Enberg,
	Américo Wang, Blue Swirl

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!

Signed-off-by: Alexander Graf <agraf@suse.de>

---

v1 -> v2:

  - fix naming of QEMU
  - use grep -q for has_config
  - support multiple -a args
  - spawn gdb on execution
  - pass through qemu options
  - dont use qemu-system-x86_64 on i386
  - add funny sentence to startup text
  - more helpful error messages

v2 -> v3:

  - move to tools/testing
  - fix running: message

  ( sorry for sending this version so late - I got caught up in
    random other stuff )

---
 tools/testing/run-qemu/run-qemu.sh |  338 ++++++++++++++++++++++++++++++++++++
 1 files changed, 338 insertions(+), 0 deletions(-)
 create mode 100755 tools/testing/run-qemu/run-qemu.sh

diff --git a/tools/testing/run-qemu/run-qemu.sh b/tools/testing/run-qemu/run-qemu.sh
new file mode 100755
index 0000000..70f194f
--- /dev/null
+++ b/tools/testing/run-qemu/run-qemu.sh
@@ -0,0 +1,338 @@
+#!/bin/bash
+#
+# QEMU Launcher
+#
+# This script enables simple use of the KVM and QEMU tool stack for
+# easy kernel testing. It allows to pass either a host directory to
+# the guest or a disk image. Example usage:
+#
+# Run the host root fs inside a VM:
+#
+# $ ./scripts/run-qemu.sh -r /
+#
+# Run the same with SDL:
+#
+# $ ./scripts/run-qemu.sh -r / --sdl
+# 
+# Or with a PPC build:
+#
+# $ ARCH=ppc ./scripts/run-qemu.sh -r /
+# 
+# PPC with a mac99 model by passing options to QEMU:
+#
+# $ ARCH=ppc ./scripts/run-qemu.sh -r / -- -M mac99
+#
+
+USE_SDL=
+USE_VNC=
+USE_GDB=1
+KERNEL_BIN=arch/x86/boot/bzImage
+MON_STDIO=
+KERNEL_APPEND2=
+SERIAL=ttyS0
+SERIAL_KCONFIG=SERIAL_8250
+BASENAME=$(basename "$0")
+
+function usage() {
+	echo "
+$BASENAME allows you to execute a virtual machine with the Linux kernel
+that you just built. To only execute a simple VM, you can just run it
+on your root fs with \"-r / -a init=/bin/bash\"
+
+	-a, --append parameters
+		Append the given parameters to the kernel command line.
+
+	-d, --disk image
+		Add the image file as disk into the VM.
+
+	-D, --no-gdb
+		Don't run an xterm with gdb attached to the guest.
+
+	-r, --root directory
+		Use the specified directory as root directory inside the guest.
+
+	-s, --sdl
+		Enable SDL graphical output.
+
+	-S, --smp cpus
+		Set number of virtual CPUs.
+
+	-v, --vnc
+		Enable VNC graphical output.
+
+Examples:
+
+	Run the host root fs inside a VM:
+	$ ./scripts/run-qemu.sh -r /
+
+	Run the same with SDL:
+	$ ./scripts/run-qemu.sh -r / --sdl
+	
+	Or with a PPC build:
+	$ ARCH=ppc ./scripts/run-qemu.sh -r /
+	
+	PPC with a mac99 model by passing options to QEMU:
+	$ ARCH=ppc ./scripts/run-qemu.sh -r / -- -M mac99
+"
+}
+
+function require_config() {
+	if [ "$(grep CONFIG_$1=y .config)" ]; then
+		return
+	fi
+
+	echo "You need to enable CONFIG_$1 for run-qemu to work properly"
+	exit 1
+}
+
+function has_config() {
+	grep -q "CONFIG_$1=y" .config
+}
+
+function drive_if() {
+	if has_config VIRTIO_BLK; then
+		echo virtio
+	elif has_config ATA_PIIX; then
+		echo ide
+	else
+		echo "\
+Your kernel must have either VIRTIO_BLK or ATA_PIIX
+enabled for block device assignment" >&2
+		exit 1
+	fi
+}
+
+GETOPT=`getopt -o a:d:Dhr:sS:v --long append,disk:,no-gdb,help,root:,sdl,smp:,vnc \
+	-n "$(basename \"$0\")" -- "$@"`
+
+if [ $? != 0 ]; then
+	echo "Terminating..." >&2
+	exit 1
+fi
+
+eval set -- "$GETOPT"
+
+while true; do
+	case "$1" in
+	-a|--append)
+		KERNEL_APPEND2="$KERNEL_APPEND2 $KERNEL_APPEND2"
+		shift
+		;;
+	-d|--disk)
+		QEMU_OPTIONS="$QEMU_OPTIONS -drive \
+			file=$2,if=$(drive_if),cache=unsafe"
+		USE_DISK=1
+		shift
+		;;
+	-D|--no-gdb)
+		USE_GDB=
+		;;
+	-h|--help)
+		usage
+		exit 0
+		;;
+	-r|--root)
+		ROOTFS="$2"
+		shift
+		;;
+	-s|--sdl)
+		USE_SDL=1
+		;;
+	-S|--smp)
+		SMP="$2"
+		shift
+		;;
+	-v|--vnc)
+		USE_VNC=1
+		;;
+	--)
+		shift
+		break
+		;;
+	*)
+		echo "Could not parse option: $1" >&2
+		exit 1
+		;;
+	esac
+	shift
+done
+
+if [ ! "$ROOTFS" -a ! "$USE_DISK" ]; then
+	echo "\
+Error: Please specify at least -r or -d with a target \
+FS to run off of" >&2
+	exit 1
+fi
+
+# Try to find the KVM accelerated QEMU binary
+
+[ "$ARCH" ] || ARCH=$(uname -m)
+case $ARCH in
+x86_64)
+	KERNEL_BIN=arch/x86/boot/bzImage
+	# SUSE and Red Hat call the binary qemu-kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-kvm 2>/dev/null)
+
+	# Debian and Gentoo call it kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which kvm 2>/dev/null)
+
+	# QEMU's own build system calls it qemu-system-x86_64
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-x86_64 2>/dev/null)
+	;;
+i*86)
+	KERNEL_BIN=arch/x86/boot/bzImage
+	# SUSE and Red Hat call the binary qemu-kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-kvm 2>/dev/null)
+
+	# Debian and Gentoo call it kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which kvm 2>/dev/null)
+
+	KERNEL_BIN=arch/x86/boot/bzImage
+	# i386 version of QEMU
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu 2>/dev/null)
+	;;
+s390*)
+	KERNEL_BIN=arch/s390/boot/image
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-s390x 2>/dev/null)
+	;;
+ppc*)
+	KERNEL_BIN=vmlinux
+
+	IS_64BIT=
+	has_config PPC64 && IS_64BIT=64
+	if has_config PPC_85xx; then
+		QEMU_OPTIONS="$QEMU_OPTIONS -M mpc8544ds"
+	elif has_config PPC_PSERIES; then
+		QEMU_OPTIONS="$QEMU_OPTIONS -M pseries"
+		SERIAL=hvc0
+		SERIAL_KCONFIG=HVC_CONSOLE
+	elif has_config PPC_PMAC; then
+		has_config SERIAL_PMACZILOG_TTYS || SERIAL=ttyPZ0
+		SERIAL_KCONFIG=SERIAL_PMACZILOG
+	else
+		echo "Unknown PPC board" >&2
+		exit 1
+	fi
+
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-ppc${IS_64BIT} 2>/dev/null)
+	;;
+esac
+
+if [ ! -e "$QEMU_BIN" ]; then
+	echo "\
+Could not find a usable QEMU binary. Please install one from \
+your distro or from source code using:
+
+  $ git clone git://git.qemu.org/qemu.git
+  $ cd qemu
+  $ ./configure
+  $ make -j
+  $ sudo make install
+" >&2
+	exit 1
+fi
+
+# The binaries without kvm in their name can be too old to support KVM, so
+# check for that before the user gets confused
+if [ ! "$(echo $QEMU_BIN | grep kvm)" -a \
+     ! "$($QEMU_BIN --help | egrep '^-machine')" ]; then
+	echo "Your QEMU binary is too old, please update to at least 0.15." >&2
+	exit 1
+fi
+QEMU_OPTIONS="$QEMU_OPTIONS -machine accel=kvm:tcg"
+
+# We need to check some .config variables to make sure we actually work
+# on the respective kernel.
+if [ ! -e .config ]; then
+	echo "\
+Please run this script on a fully compiled and configured
+Linux kernel build directory" >&2
+	exit 1
+fi
+
+if [ ! -e "$KERNEL_BIN" ]; then
+	echo "Could not find kernel binary: $KERNEL_BIN" >&2
+	exit 1
+fi
+
+QEMU_OPTIONS="$QEMU_OPTIONS -kernel $KERNEL_BIN"
+
+if [ "$USE_SDL" ]; then
+	# SDL is the default, so nothing to do
+	:
+elif [ "$USE_VNC" ]; then
+	QEMU_OPTIONS="$QEMU_OPTIONS -vnc :5"
+else
+	# When emulating a serial console, tell the kernel to use it as well
+	QEMU_OPTIONS="$QEMU_OPTIONS -nographic"
+	KERNEL_APPEND="$KERNEL_APPEND console=$SERIAL earlyprintk=serial"
+	MON_STDIO=1
+	require_config "$SERIAL_KCONFIG"
+fi
+
+if [ "$ROOTFS" ]; then
+	# Using rootfs with 9p
+	require_config "NET_9P_VIRTIO"
+	KERNEL_APPEND="$KERNEL_APPEND \
+root=/dev/root rootflags=rw,trans=virtio,version=9p2000.L rootfstype=9p"
+
+#Usage: -virtfs fstype,path=/share_path/,security_model=[mapped|passthrough|none],mount_tag=tag.
+
+
+	QEMU_OPTIONS="$QEMU_OPTIONS \
+-virtfs local,id=root,path=$ROOTFS,mount_tag=root,security_model=passthrough \
+-device virtio-9p-pci,fsdev=root,mount_tag=/dev/root"
+fi
+
+[ "$SMP" ] || SMP=1
+
+# User append args come last
+KERNEL_APPEND="$KERNEL_APPEND $KERNEL_APPEND2"
+
+############### Execution #################
+
+QEMU_OPTIONS="$QEMU_OPTIONS -smp $SMP"
+
+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 use QEMU command
+line options and add them to the $BASENAME command line using --.
+
+This tool is for simplicity, not world dominating functionality coverage.
+(just a hobby, won't be big and professional like libvirt)
+
+"
+
+if [ "$MON_STDIO" ]; then
+	echo "\
+### Your guest is bound to the current foreground shell. To quit the guest, ###
+### please use Ctrl-A x                                                     ###
+"
+fi
+
+echo -n "  Executing: $QEMU_BIN $QEMU_OPTIONS -append \"$KERNEL_APPEND\" "
+for i in "$@"; do
+	echo -n "\"$i\" "
+done
+echo
+echo
+
+GDB_PID=
+if [ "$USE_GDB" -a "$DISPLAY" -a -x "$(which xterm)" -a -e "$(which gdb)" ]; then
+	# Run a gdb console in parallel to the kernel
+
+	# XXX find out if port is in use
+	PORT=$(( $$ + 1024 ))
+	xterm -T "$BASENAME" -e "sleep 2; gdb vmlinux -ex 'target remote localhost:$PORT' -ex c" &
+	GDB_PID=$!
+	QEMU_OPTIONS="$QEMU_OPTIONS -gdb tcp::$PORT"
+fi
+
+$QEMU_BIN $QEMU_OPTIONS -append "$KERNEL_APPEND" "$@"
+wait $GDB_PID &>/dev/null
+
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 447+ messages in thread
* [PATCH] KVM: Add wrapper script around QEMU to test kernels
@ 2012-05-11 15:46 Alexander Graf
  0 siblings, 0 replies; 447+ messages in thread
From: Alexander Graf @ 2012-05-11 15:46 UTC (permalink / raw)
  To: kvm@vger.kernel.org list
  Cc: Linus Torvalds, qemu-devel Developers,
	linux-kernel@vger.kernel.org List, Avi Kivity,
	Andreas Färber

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:

    $ ./tools/testing/run-qemu/run-qemu.sh -r / -a init=/bin/bash

This will drop you into a shell on your rootfs.

Or you can also use a ready made image:

    $ IMG=http://people.debian.org/~aurel32/qemu/amd64
    $ IMG="$IMG/debian_squeeze_amd64_standard.qcow2"
    $ ./tools/testing/run-qemu/run-qemu.sh -d $IMG \
        -a "root=/dev/vda1 init=/bin/bash"

Keep in mind that http is read-only, so no writing to the image :).

Either way, you provide the kernel. QEMU provides the test environment!
Easy, eh?

Happy hacking!

Signed-off-by: Alexander Graf <agraf@suse.de>

---

v1 -> v2:

  - fix naming of QEMU
  - use grep -q for has_config
  - support multiple -a args
  - spawn gdb on execution
  - pass through qemu options
  - dont use qemu-system-x86_64 on i386
  - add funny sentence to startup text
  - more helpful error messages

v2 -> v3:

  - move to tools/testing
  - fix running: message

v3 -> v4:

  - update to new path everywhere
  - check for sd module in ide case
  - fix -a
  - simplify KERNEL_BIN setting code
  - check for qemu-system-i386
  - require CONFIG_9P_FS in 9p case
  - add QEMU version check
  - check for success of drive_if
  - mention QEMU_BIN environment variable in help
---
 tools/testing/run-qemu/run-qemu.sh |  361 ++++++++++++++++++++++++++++++++++++
 1 files changed, 361 insertions(+), 0 deletions(-)
 create mode 100755 tools/testing/run-qemu/run-qemu.sh

diff --git a/tools/testing/run-qemu/run-qemu.sh b/tools/testing/run-qemu/run-qemu.sh
new file mode 100755
index 0000000..f4fa6e7
--- /dev/null
+++ b/tools/testing/run-qemu/run-qemu.sh
@@ -0,0 +1,361 @@
+#!/bin/bash
+#
+# QEMU Launcher
+#
+# This script enables simple use of the KVM and QEMU tool stack for
+# easy kernel testing. It allows to pass either a host directory to
+# the guest or a disk image. Example usage:
+#
+# Run the host root fs inside a VM:
+#
+# $ ./tools/testing/run-qemu/run-qemu.sh -r /
+#
+# Run the same with SDL:
+#
+# $ ./tools/testing/run-qemu/run-qemu.sh -r / --sdl
+#
+# Or with a PPC build:
+#
+# $ ARCH=ppc ./tools/testing/run-qemu/run-qemu.sh -r /
+#
+# PPC with a mac99 model by passing options to QEMU:
+#
+# $ ARCH=ppc ./tools/testing/run-qemu/run-qemu.sh -r / -- -M mac99
+#
+
+USE_SDL=
+USE_VNC=
+USE_GDB=1
+KERNEL_BIN=arch/x86/boot/bzImage
+MON_STDIO=
+KERNEL_APPEND2=
+SERIAL=ttyS0
+SERIAL_KCONFIG=SERIAL_8250
+BASENAME=$(basename "$0")
+
+function usage() {
+	echo "
+$BASENAME allows you to execute a virtual machine with the Linux kernel
+that you just built. To only execute a simple VM, you can just run it
+on your root fs with \"-r / -a init=/bin/bash\"
+
+	-a, --append parameters
+		Append the given parameters to the kernel command line.
+
+	-d, --disk image
+		Add the image file as disk into the VM.
+
+	-D, --no-gdb
+		Don't run an xterm with gdb attached to the guest.
+
+	-r, --root directory
+		Use the specified directory as root directory inside the guest.
+
+	-s, --sdl
+		Enable SDL graphical output.
+
+	-S, --smp cpus
+		Set number of virtual CPUs.
+
+	-v, --vnc
+		Enable VNC graphical output.
+
+Examples:
+
+	Run the host root fs inside a VM:
+	$ ./tools/testing/run-qemu/run-qemu.sh -r /
+
+	Run the same with SDL:
+	$ ./tools/testing/run-qemu/run-qemu.sh -r / --sdl
+
+	Or with a PPC build:
+	$ ARCH=ppc ./tools/testing/run-qemu/run-qemu.sh -r /
+
+	PPC with a mac99 model by passing options to QEMU:
+	$ ARCH=ppc ./tools/testing/run-qemu/run-qemu.sh -r / -- -M mac99
+"
+}
+
+function require_config() {
+	if [ "$(grep CONFIG_$1=y .config)" ]; then
+		return
+	fi
+
+	echo "You need to enable CONFIG_$1 for run-qemu to work properly"
+	exit 1
+}
+
+function has_config() {
+	grep -q "CONFIG_$1=y" .config
+}
+
+function drive_if() {
+	if has_config VIRTIO_BLK; then
+		echo virtio
+	elif has_config ATA_PIIX; then
+		require_config "BLK_DEV_SD"
+		echo ide
+	else
+		echo "\
+Your kernel must have either VIRTIO_BLK or ATA_PIIX
+enabled for block device assignment" >&2
+		exit 1
+	fi
+}
+
+function verify_qemu() {
+	QEMU="$(which $1 2>/dev/null)"
+
+	# binary exists?
+	[ -x "$QEMU" ] || exit 1
+
+	# we need a version that knows -machine
+	if ! "$QEMU" --help | grep -q -- '-machine'; then
+		exit 1
+	fi
+
+	echo "$QEMU"
+	exit 0
+}
+
+GETOPT=`getopt -o a:d:Dhr:sS:v --long append,disk:,no-gdb,help,root:,sdl,smp:,vnc \
+	-n "$(basename \"$0\")" -- "$@"`
+
+if [ $? != 0 ]; then
+	echo "Terminating..." >&2
+	exit 1
+fi
+
+eval set -- "$GETOPT"
+
+while true; do
+	case "$1" in
+	-a|--append)
+		KERNEL_APPEND2="$KERNEL_APPEND2 $2"
+		shift
+		;;
+	-d|--disk)
+		set -e
+		QEMU_OPTIONS="$QEMU_OPTIONS -drive \
+			file=$2,if=$(drive_if),cache=unsafe"
+		set +e
+		USE_DISK=1
+		shift
+		;;
+	-D|--no-gdb)
+		USE_GDB=
+		;;
+	-h|--help)
+		usage
+		exit 0
+		;;
+	-r|--root)
+		ROOTFS="$2"
+		shift
+		;;
+	-s|--sdl)
+		USE_SDL=1
+		;;
+	-S|--smp)
+		SMP="$2"
+		shift
+		;;
+	-v|--vnc)
+		USE_VNC=1
+		;;
+	--)
+		shift
+		break
+		;;
+	*)
+		echo "Could not parse option: $1" >&2
+		exit 1
+		;;
+	esac
+	shift
+done
+
+if [ ! "$ROOTFS" -a ! "$USE_DISK" ]; then
+	echo "\
+Error: Please specify at least -r or -d with a target \
+FS to run off of" >&2
+	exit 1
+fi
+
+# Try to find the KVM accelerated QEMU binary
+
+[ "$ARCH" ] || ARCH=$(uname -m)
+case $ARCH in
+x86_64)
+	# SUSE and Red Hat call the binary qemu-kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(verify_qemu qemu-kvm)
+
+	# Debian and Gentoo call it kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(verify_qemu kvm)
+
+	# QEMU's own build system calls it qemu-system-x86_64
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(verify_qemu qemu-system-x86_64)
+	;;
+i*86)
+	# SUSE and Red Hat call the binary qemu-kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(verify_qemu qemu-kvm)
+
+	# Debian and Gentoo call it kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(verify_qemu kvm)
+
+	# new i386 version of QEMU
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(verify_qemu qemu-system-i386)
+
+	# i386 version of QEMU
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(verify_qemu qemu)
+	;;
+s390*)
+	KERNEL_BIN=arch/s390/boot/image
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(verify_qemu qemu-system-s390x)
+	;;
+ppc*)
+	KERNEL_BIN=vmlinux
+
+	IS_64BIT=
+	has_config PPC64 && IS_64BIT=64
+	if has_config PPC_85xx; then
+		QEMU_OPTIONS="$QEMU_OPTIONS -M mpc8544ds"
+	elif has_config PPC_PSERIES; then
+		QEMU_OPTIONS="$QEMU_OPTIONS -M pseries"
+		SERIAL=hvc0
+		SERIAL_KCONFIG=HVC_CONSOLE
+	elif has_config PPC_PMAC; then
+		has_config SERIAL_PMACZILOG_TTYS || SERIAL=ttyPZ0
+		SERIAL_KCONFIG=SERIAL_PMACZILOG
+	else
+		echo "Unknown PPC board" >&2
+		exit 1
+	fi
+
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-ppc${IS_64BIT} 2>/dev/null)
+	;;
+esac
+
+if [ ! -e "$QEMU_BIN" ]; then
+	echo "\
+Could not find a usable QEMU binary. Please install one from \
+your distro or from source code using:
+
+  $ git clone git://git.qemu.org/qemu.git
+  $ cd qemu
+  $ ./configure
+  $ make -j
+  $ sudo make install
+
+or point this script to a working version of qemu using
+
+  $ export QEMU_BIN=/path/to/qemu-kvm
+" >&2
+	exit 1
+fi
+
+# The binaries without kvm in their name can be too old to support KVM, so
+# check for that before the user gets confused
+if [ ! "$(echo $QEMU_BIN | grep kvm)" -a \
+     ! "$($QEMU_BIN --help | egrep '^-machine')" ]; then
+	echo "Your QEMU binary is too old, please update to at least 0.15." >&2
+	exit 1
+fi
+QEMU_OPTIONS="$QEMU_OPTIONS -machine accel=kvm:tcg"
+
+# We need to check some .config variables to make sure we actually work
+# on the respective kernel.
+if [ ! -e .config ]; then
+	echo "\
+Please run this script on a fully compiled and configured
+Linux kernel build directory" >&2
+	exit 1
+fi
+
+if [ ! -e "$KERNEL_BIN" ]; then
+	echo "Could not find kernel binary: $KERNEL_BIN" >&2
+	exit 1
+fi
+
+QEMU_OPTIONS="$QEMU_OPTIONS -kernel $KERNEL_BIN"
+
+if [ "$USE_SDL" ]; then
+	# SDL is the default, so nothing to do
+	:
+elif [ "$USE_VNC" ]; then
+	QEMU_OPTIONS="$QEMU_OPTIONS -vnc :5"
+else
+	# When emulating a serial console, tell the kernel to use it as well
+	QEMU_OPTIONS="$QEMU_OPTIONS -nographic"
+	KERNEL_APPEND="$KERNEL_APPEND console=$SERIAL earlyprintk=serial"
+	MON_STDIO=1
+	require_config "$SERIAL_KCONFIG"
+fi
+
+if [ "$ROOTFS" ]; then
+	# Using rootfs with 9p
+	require_config "NET_9P_VIRTIO"
+	require_config "9P_FS"
+	KERNEL_APPEND="$KERNEL_APPEND \
+root=/dev/root rootflags=rw,trans=virtio,version=9p2000.L rootfstype=9p"
+
+#Usage: -virtfs fstype,path=/share_path/,security_model=[mapped|passthrough|none],mount_tag=tag.
+
+
+	QEMU_OPTIONS="$QEMU_OPTIONS \
+-virtfs local,id=root,path=$ROOTFS,mount_tag=root,security_model=passthrough \
+-device virtio-9p-pci,fsdev=root,mount_tag=/dev/root"
+fi
+
+[ "$SMP" ] || SMP=1
+
+# User append args come last
+KERNEL_APPEND="$KERNEL_APPEND $KERNEL_APPEND2"
+
+############### Execution #################
+
+QEMU_OPTIONS="$QEMU_OPTIONS -smp $SMP"
+
+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 use QEMU command
+line options and add them to the $BASENAME command line using --.
+
+This tool is for simplicity, not world dominating functionality coverage.
+(just a hobby, won't be big and professional like libvirt)
+
+"
+
+if [ "$MON_STDIO" ]; then
+	echo "\
+### Your guest is bound to the current foreground shell. To quit the guest, ###
+### please use Ctrl-A x                                                     ###
+"
+fi
+
+echo -n "  Executing: $QEMU_BIN $QEMU_OPTIONS -append \"$KERNEL_APPEND\" "
+for i in "$@"; do
+	echo -n "\"$i\" "
+done
+echo
+echo
+
+GDB_PID=
+if [ "$USE_GDB" -a "$DISPLAY" -a -x "$(which xterm)" -a -e "$(which gdb)" ]; then
+	# Run a gdb console in parallel to the kernel
+
+	# XXX find out if port is in use
+	PORT=$(( $$ + 1024 ))
+	xterm -T "$BASENAME" -e "sleep 2; gdb vmlinux -ex 'target remote localhost:$PORT' -ex c" &
+	GDB_PID=$!
+	QEMU_OPTIONS="$QEMU_OPTIONS -gdb tcp::$PORT"
+fi
+
+$QEMU_BIN $QEMU_OPTIONS -append "$KERNEL_APPEND" "$@"
+wait $GDB_PID &>/dev/null
+
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 447+ messages in thread
* Re: [PATCH] KVM: Add wrapper script around QEMU to test kernels
@ 2011-11-07 14:34 青云
  0 siblings, 0 replies; 447+ messages in thread
From: 青云 @ 2011-11-07 14:34 UTC (permalink / raw)
  To: Pekka Enberg, Paolo Bonzini
  Cc: kvm@vger.kernel.org list, qemu-devel Developers,
	linux-kernel@vger.kernel.org List, Alexander Graf, Blue Swirl,
	Avi Kivity, Américo Wan, Ingo Molnar, Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]

I know kgdb can test kernel,but I haven't succeed .
  
 
------------------ Original ------------------
From: "Pekka Enberg"; 
Date: 2011年11月7日(星期一) 下午4:57
To: "Paolo Bonzini"; 
Cc: "Alexander Graf"; "kvm@vger.kernel.org list"; "qemu-devel Developers"; "linux-kernel@vger.kernel.org List"; "Blue Swirl"; "Avi Kivity"; "Américo Wan"; "Ingo Molnar"; "Linus Torvalds"; 
Subject: Re: [PATCH] KVM: Add wrapper script around QEMU to test kernels

 
On 11/07/2011 09:45 AM, Pekka Enberg wrote:
>>> Specifications matter much more than working code.  Quirks are a fact
>>> of life but should always come second.
>>
>> To quote Linus:
>>
>>   And I have seen _lots_ of total crap work that was based on specs. It's
>> _the_ single worst way to write software, because it by definition means
>>   that the software was written to match theory, not reality.

On Mon, Nov 7, 2011 at 10:52 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> All generalizations are false.

What is that supposed to mean? You claimed we're "doing it wrong" and
I explained you why we are doing it the way we are.

Really, the way we do things in the KVM tool is not a bug, it's a feature.

                        Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[-- Attachment #2: Type: text/html, Size: 2710 bytes --]

^ permalink raw reply	[flat|nested] 447+ messages in thread
* [PATCH] KVM: Add wrapper script around QEMU to test kernels
@ 2011-08-24 21:38 ` Alexander Graf
  0 siblings, 0 replies; 447+ messages in thread
From: Alexander Graf @ 2011-08-24 21:38 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ingo Molnar, Avi Kivity, linux-kernel@vger.kernel.org List,
	kvm@vger.kernel.org list, qemu-devel Developers, Pekka Enberg

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!

Signed-off-by: Alexander Graf <agraf@suse.de>

---

v1 -> v2:

  - fix naming of QEMU
  - use grep -q for has_config
  - support multiple -a args
  - spawn gdb on execution
  - pass through qemu options
  - dont use qemu-system-x86_64 on i386
  - add funny sentence to startup text
  - more helpful error messages
---
 scripts/run-qemu.sh |  334 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 334 insertions(+), 0 deletions(-)
 create mode 100755 scripts/run-qemu.sh

diff --git a/scripts/run-qemu.sh b/scripts/run-qemu.sh
new file mode 100755
index 0000000..5d4e185
--- /dev/null
+++ b/scripts/run-qemu.sh
@@ -0,0 +1,334 @@
+#!/bin/bash
+#
+# QEMU Launcher
+#
+# This script enables simple use of the KVM and QEMU tool stack for
+# easy kernel testing. It allows to pass either a host directory to
+# the guest or a disk image. Example usage:
+#
+# Run the host root fs inside a VM:
+#
+# $ ./scripts/run-qemu.sh -r /
+#
+# Run the same with SDL:
+#
+# $ ./scripts/run-qemu.sh -r / --sdl
+# 
+# Or with a PPC build:
+#
+# $ ARCH=ppc ./scripts/run-qemu.sh -r /
+# 
+# PPC with a mac99 model by passing options to QEMU:
+#
+# $ ARCH=ppc ./scripts/run-qemu.sh -r / -- -M mac99
+#
+
+USE_SDL=
+USE_VNC=
+USE_GDB=1
+KERNEL_BIN=arch/x86/boot/bzImage
+MON_STDIO=
+KERNEL_APPEND2=
+SERIAL=ttyS0
+SERIAL_KCONFIG=SERIAL_8250
+BASENAME=$(basename "$0")
+
+function usage() {
+	echo "
+$BASENAME allows you to execute a virtual machine with the Linux kernel
+that you just built. To only execute a simple VM, you can just run it
+on your root fs with \"-r / -a init=/bin/bash\"
+
+	-a, --append parameters
+		Append the given parameters to the kernel command line.
+
+	-d, --disk image
+		Add the image file as disk into the VM.
+
+	-D, --no-gdb
+		Don't run an xterm with gdb attached to the guest.
+
+	-r, --root directory
+		Use the specified directory as root directory inside the guest.
+
+	-s, --sdl
+		Enable SDL graphical output.
+
+	-S, --smp cpus
+		Set number of virtual CPUs.
+
+	-v, --vnc
+		Enable VNC graphical output.
+
+Examples:
+
+	Run the host root fs inside a VM:
+	$ ./scripts/run-qemu.sh -r /
+
+	Run the same with SDL:
+	$ ./scripts/run-qemu.sh -r / --sdl
+	
+	Or with a PPC build:
+	$ ARCH=ppc ./scripts/run-qemu.sh -r /
+	
+	PPC with a mac99 model by passing options to QEMU:
+	$ ARCH=ppc ./scripts/run-qemu.sh -r / -- -M mac99
+"
+}
+
+function require_config() {
+	if [ "$(grep CONFIG_$1=y .config)" ]; then
+		return
+	fi
+
+	echo "You need to enable CONFIG_$1 for run-qemu to work properly"
+	exit 1
+}
+
+function has_config() {
+	grep -q "CONFIG_$1=y" .config
+}
+
+function drive_if() {
+	if has_config VIRTIO_BLK; then
+		echo virtio
+	elif has_config ATA_PIIX; then
+		echo ide
+	else
+		echo "\
+Your kernel must have either VIRTIO_BLK or ATA_PIIX
+enabled for block device assignment" >&2
+		exit 1
+	fi
+}
+
+GETOPT=`getopt -o a:d:Dhr:sS:v --long append,disk:,no-gdb,help,root:,sdl,smp:,vnc \
+	-n "$(basename \"$0\")" -- "$@"`
+
+if [ $? != 0 ]; then
+	echo "Terminating..." >&2
+	exit 1
+fi
+
+eval set -- "$GETOPT"
+
+while true; do
+	case "$1" in
+	-a|--append)
+		KERNEL_APPEND2="$KERNEL_APPEND2 $KERNEL_APPEND2"
+		shift
+		;;
+	-d|--disk)
+		QEMU_OPTIONS="$QEMU_OPTIONS -drive \
+			file=$2,if=$(drive_if),cache=unsafe"
+		USE_DISK=1
+		shift
+		;;
+	-D|--no-gdb)
+		USE_GDB=
+		;;
+	-h|--help)
+		usage
+		exit 0
+		;;
+	-r|--root)
+		ROOTFS="$2"
+		shift
+		;;
+	-s|--sdl)
+		USE_SDL=1
+		;;
+	-S|--smp)
+		SMP="$2"
+		shift
+		;;
+	-v|--vnc)
+		USE_VNC=1
+		;;
+	--)
+		shift
+		break
+		;;
+	*)
+		echo "Could not parse option: $1" >&2
+		exit 1
+		;;
+	esac
+	shift
+done
+
+if [ ! "$ROOTFS" -a ! "$USE_DISK" ]; then
+	echo "\
+Error: Please specify at least -r or -d with a target \
+FS to run off of" >&2
+	exit 1
+fi
+
+# Try to find the KVM accelerated QEMU binary
+
+[ "$ARCH" ] || ARCH=$(uname -m)
+case $ARCH in
+x86_64)
+	KERNEL_BIN=arch/x86/boot/bzImage
+	# SUSE and Red Hat call the binary qemu-kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-kvm 2>/dev/null)
+
+	# Debian and Gentoo call it kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which kvm 2>/dev/null)
+
+	# QEMU's own build system calls it qemu-system-x86_64
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-x86_64 2>/dev/null)
+	;;
+i*86)
+	KERNEL_BIN=arch/x86/boot/bzImage
+	# SUSE and Red Hat call the binary qemu-kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-kvm 2>/dev/null)
+
+	# Debian and Gentoo call it kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which kvm 2>/dev/null)
+
+	KERNEL_BIN=arch/x86/boot/bzImage
+	# i386 version of QEMU
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu 2>/dev/null)
+	;;
+s390*)
+	KERNEL_BIN=arch/s390/boot/image
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-s390x 2>/dev/null)
+	;;
+ppc*)
+	KERNEL_BIN=vmlinux
+
+	IS_64BIT=
+	has_config PPC64 && IS_64BIT=64
+	if has_config PPC_85xx; then
+		QEMU_OPTIONS="$QEMU_OPTIONS -M mpc8544ds"
+	elif has_config PPC_PSERIES; then
+		QEMU_OPTIONS="$QEMU_OPTIONS -M pseries"
+		SERIAL=hvc0
+		SERIAL_KCONFIG=HVC_CONSOLE
+	elif has_config PPC_PMAC; then
+		has_config SERIAL_PMACZILOG_TTYS || SERIAL=ttyPZ0
+		SERIAL_KCONFIG=SERIAL_PMACZILOG
+	else
+		echo "Unknown PPC board" >&2
+		exit 1
+	fi
+
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-ppc${IS_64BIT} 2>/dev/null)
+	;;
+esac
+
+if [ ! -e "$QEMU_BIN" ]; then
+	echo "\
+Could not find a usable QEMU binary. Please install one from \
+your distro or from source code using:
+
+  $ git clone git://git.qemu.org/qemu.git
+  $ cd qemu
+  $ ./configure
+  $ make -j
+  $ sudo make install
+" >&2
+	exit 1
+fi
+
+# The binaries without kvm in their name can be too old to support KVM, so
+# check for that before the user gets confused
+if [ ! "$(echo $QEMU_BIN | grep kvm)" -a \
+     ! "$($QEMU_BIN --help | egrep '^-machine')" ]; then
+	echo "Your QEMU binary is too old, please update to at least 0.15." >&2
+	exit 1
+fi
+QEMU_OPTIONS="$QEMU_OPTIONS -machine accel=kvm:tcg"
+
+# We need to check some .config variables to make sure we actually work
+# on the respective kernel.
+if [ ! -e .config ]; then
+	echo "\
+Please run this script on a fully compiled and configured
+Linux kernel build directory" >&2
+	exit 1
+fi
+
+if [ ! -e "$KERNEL_BIN" ]; then
+	echo "Could not find kernel binary: $KERNEL_BIN" >&2
+	exit 1
+fi
+
+QEMU_OPTIONS="$QEMU_OPTIONS -kernel $KERNEL_BIN"
+
+if [ "$USE_SDL" ]; then
+	# SDL is the default, so nothing to do
+	:
+elif [ "$USE_VNC" ]; then
+	QEMU_OPTIONS="$QEMU_OPTIONS -vnc :5"
+else
+	# When emulating a serial console, tell the kernel to use it as well
+	QEMU_OPTIONS="$QEMU_OPTIONS -nographic"
+	KERNEL_APPEND="$KERNEL_APPEND console=$SERIAL earlyprintk=serial"
+	MON_STDIO=1
+	require_config "$SERIAL_KCONFIG"
+fi
+
+if [ "$ROOTFS" ]; then
+	# Using rootfs with 9p
+	require_config "NET_9P_VIRTIO"
+	KERNEL_APPEND="$KERNEL_APPEND \
+root=/dev/root rootflags=rw,trans=virtio,version=9p2000.L rootfstype=9p"
+
+#Usage: -virtfs fstype,path=/share_path/,security_model=[mapped|passthrough|none],mount_tag=tag.
+
+
+	QEMU_OPTIONS="$QEMU_OPTIONS \
+-virtfs local,id=root,path=$ROOTFS,mount_tag=root,security_model=passthrough \
+-device virtio-9p-pci,fsdev=root,mount_tag=/dev/root"
+fi
+
+[ "$SMP" ] || SMP=1
+
+# User append args come last
+KERNEL_APPEND="$KERNEL_APPEND $KERNEL_APPEND2"
+
+############### Execution #################
+
+QEMU_OPTIONS="$QEMU_OPTIONS -smp $SMP"
+
+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 use QEMU command
+line options and add them to the $BASENAME command line using --.
+
+This tool is for simplicity, not world dominating functionality coverage.
+(just a hobby, won't be big and professional like libvirt)
+
+"
+
+if [ "$MON_STDIO" ]; then
+	echo "\
+### Your guest is bound to the current foreground shell. To quit the guest, ###
+### please use Ctrl-A x                                                     ###
+"
+fi
+
+echo "  Executing: $QEMU_BIN $QEMU_OPTIONS -append \"$KERNEL_APPEND\""
+echo
+
+GDB_PID=
+if [ "$USE_GDB" -a "$DISPLAY" -a -x "$(which xterm)" -a -e "$(which gdb)" ]; then
+	# Run a gdb console in parallel to the kernel
+
+	# XXX find out if port is in use
+	PORT=$$
+	xterm -T "$BASENAME" -e "sleep 2; gdb vmlinux -ex 'target remote localhost:$PORT' -ex c" &
+	GDB_PID=$!
+	QEMU_OPTIONS="$QEMU_OPTIONS -gdb tcp::$PORT"
+fi
+
+$QEMU_BIN $QEMU_OPTIONS -append "$KERNEL_APPEND" "$@"
+wait $GDB_PID &>/dev/null
+
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 447+ messages in thread
* [PATCH] KVM: Add wrapper script around Qemu to test kernels
@ 2011-08-23 22:16 ` Alexander Graf
  0 siblings, 0 replies; 447+ messages in thread
From: Alexander Graf @ 2011-08-23 22:16 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ingo Molnar, Avi Kivity, linux-kernel@vger.kernel.org List,
	kvm@vger.kernel.org list, qemu-devel Developers, Pekka Enberg

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!

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 Documentation/run-qemu.sh |  284 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 284 insertions(+), 0 deletions(-)
 create mode 100755 Documentation/run-qemu.sh

diff --git a/Documentation/run-qemu.sh b/Documentation/run-qemu.sh
new file mode 100755
index 0000000..0bac924
--- /dev/null
+++ b/Documentation/run-qemu.sh
@@ -0,0 +1,284 @@
+#!/bin/bash
+#
+# QEMU Launcher
+#
+# This script enables simple use of the KVM and Qemu tool stack for
+# easy kernel testing. It allows to pass either a host directory to
+# the guest or a disk image. Example usage:
+#
+# Run the host root fs inside a VM:
+#
+# $ ./Documentation/run-qemu.sh -r /
+#
+# Run the same with SDL:
+#
+# $ ./Documentation/run-qemu.sh -r / --sdl
+# 
+# Or with a PPC build:
+#
+# $ ARCH=ppc ./Documentation/run-qemu.sh -r /
+# 
+#
+
+USE_SDL=
+USE_VNC=
+KERNEL_BIN=arch/x86/boot/bzImage
+MON_STDIO=
+KERNEL_APPEND2=
+SERIAL=ttyS0
+SERIAL_KCONFIG=SERIAL_8250
+
+function usage() {
+	echo "
+Run-Qemu allows you to execute a virtual machine with the Linux kernel
+that you just built. To only execute a simple VM, you can just run it
+on your root fs with \"-r / -a init=/bin/bash\"
+
+	-a, --append parameters
+		Append the given parameters to the kernel command line
+
+	-d, --disk image
+		Add the image file as disk into the VM
+
+	-r, --root directory
+		Use the specified directory as root directory inside the guest.
+
+	-s, --sdl
+		Enable SDL graphical output.
+
+	-S, --smp cpus
+		Set number of virtual CPUs
+
+	-v, --vnc
+		Enable VNC graphical output.
+
+Examples:
+
+	Run the host root fs inside a VM:
+	$ ./Documentation/run-qemu.sh -r /
+
+	Run the same with SDL:
+	$ ./Documentation/run-qemu.sh -r / --sdl
+	
+	Or with a PPC build:
+	$ ARCH=ppc ./Documentation/run-qemu.sh -r /
+"
+}
+
+function require_config() {
+	if [ "$(grep CONFIG_$1=y .config)" ]; then
+		return
+	fi
+
+	echo "You need to enable CONFIG_$1 for run-qemu to work properly"
+	exit 1
+}
+
+function has_config() {
+	grep "CONFIG_$1=y" .config
+}
+
+function drive_if() {
+	if [ "$(has_config VIRTIO_BLK)" ]; then
+		echo virtio
+	elif [ "$(has_config ATA_PIIX)" ]; then
+		echo ide
+	else
+		echo "\
+Your kernel must have either VIRTIO_BLK or ATA_PIIX
+enabled for block device assignment" >&2
+		exit 1
+	fi
+}
+
+GETOPT=`getopt -o a:d:hr:sS:v --long append,disk:,help,root:,sdl,smp:,vnc \
+	-n "$(basename \"$0\")" -- "$@"`
+
+if [ $? != 0 ]; then
+	echo "Terminating..." >&2
+	exit 1
+fi
+
+eval set -- "$GETOPT"
+
+while true; do
+	case "$1" in
+	-a|--append)
+		KERNEL_APPEND2="$2"
+		shift 2
+		;;
+	-d|--disk)
+		QEMU_OPTIONS="$QEMU_OPTIONS -drive \
+			file=$2,if=$(drive_if),cache=unsafe"
+		USE_DISK=1
+		shift 2
+		;;
+	-h|--help)
+		usage
+		exit 0
+		;;
+	-r|--root)
+		ROOTFS="$2"
+		shift 2
+		;;
+	-s|--sdl)
+		USE_SDL=1
+		shift
+		;;
+	-S|--smp)
+		SMP="$2"
+		shift 2
+		;;
+	-v|--vnc)
+		USE_VNC=1
+		shift
+		;;
+	--)
+		shift
+		break
+		;;
+	*)
+		echo "Could not parse option: $1" >&2
+		exit 1
+		;;
+	esac
+done
+
+if [ ! "$ROOTFS" -a ! "$USE_DISK" ]; then
+	echo "\
+Error: Please specify at least -r or -d with a target \
+FS to run off of" >&2
+	exit 1
+fi
+
+# Try to find the KVM accelerated Qemu binary
+
+[ "$ARCH" ] || ARCH=$(uname -m)
+case $ARCH in
+i*86|x86_64)
+	KERNEL_BIN=arch/x86/boot/bzImage
+	# SUSE and Red Hat call the binary qemu-kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-kvm 2>/dev/null)
+
+	# Debian and Gentoo call it kvm
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which kvm 2>/dev/null)
+
+	# Qemu's own build system calls it qemu-system-x86_64
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-x86_64 2>/dev/null)
+
+	# i386 version of Qemu
+	if [ ! "$(has_config X86_64)" ]; then
+		[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu 2>/dev/null)
+	fi
+	;;
+s390*)
+	KERNEL_BIN=arch/s390/boot/image
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-s390x 2>/dev/null)
+	;;
+ppc*)
+	KERNEL_BIN=vmlinux
+
+	IS_64BIT=
+	[ "$(has_config PPC64)" ] && IS_64BIT=64
+	if [ "$(has_config PPC_85xx)" ]; then
+		QEMU_OPTIONS="$QEMU_OPTIONS -M mpc8544ds"
+	elif [ "$(has_config PPC_PSERIES)" ]; then
+		QEMU_OPTIONS="$QEMU_OPTIONS -M pseries"
+		SERIAL=hvc0
+		SERIAL_KCONFIG=HVC_CONSOLE
+	elif [ "$(has_config PPC_PMAC)" ]; then
+		[ "$(has_config SERIAL_PMACZILOG_TTYS)" ] || SERIAL=ttyPZ0
+		SERIAL_KCONFIG=SERIAL_PMACZILOG
+	else
+		echo "Unknown PPC board" >&2
+		exit 1
+	fi
+
+	[ "$QEMU_BIN" ] || QEMU_BIN=$(which qemu-system-ppc${IS_64BIT} 2>/dev/null)
+	;;
+esac
+
+if [ ! "$QEMU_BIN" ]; then
+	echo "\
+Could not find a usable Qemu binary. Please install one from \
+your distro or from source code." >&2
+	exit 1
+fi
+
+# The binaries without kvm in their name can be too old to support KVM, so
+# check for that before the user gets confused
+if [ ! "$(echo $QEMU_BIN | grep kvm)" -a \
+     ! "$($QEMU_BIN --help | egrep '^-machine')" ]; then
+	echo "Your Qemu binary is too old, please update to at least 0.15." >&2
+	exit 1
+fi
+QEMU_OPTIONS="$QEMU_OPTIONS -machine accel=kvm:tcg"
+
+# We need to check some .config variables to make sure we actually work
+# on the respective kernel.
+if [ ! -e .config ]; then
+	echo "\
+Please run this script on a fully compiled and configured
+Linux kernel build directory" >&2
+	exit 1
+fi
+
+if [ ! -e "$KERNEL_BIN" ]; then
+	echo "Could not find kernel binary: $KERNEL_BIN" >&2
+	exit 1
+fi
+
+QEMU_OPTIONS="$QEMU_OPTIONS -kernel $KERNEL_BIN"
+
+if [ "$USE_SDL" ]; then
+	# SDL is the default, so nothing to do
+	:
+elif [ "$USE_VNC" ]; then
+	QEMU_OPTIONS="$QEMU_OPTIONS -vnc :5"
+else
+	# When emulating a serial console, tell the kernel to use it as well
+	QEMU_OPTIONS="$QEMU_OPTIONS -nographic"
+	KERNEL_APPEND="$KERNEL_APPEND console=$SERIAL earlyprintk=serial"
+	MON_STDIO=1
+	require_config "$SERIAL_KCONFIG"
+fi
+
+if [ "$ROOTFS" ]; then
+	# Using rootfs with 9p
+	require_config "NET_9P_VIRTIO"
+	KERNEL_APPEND="$KERNEL_APPEND \
+root=/dev/root rootflags=rw,trans=virtio,version=9p2000.L rootfstype=9p"
+
+#Usage: -virtfs fstype,path=/share_path/,security_model=[mapped|passthrough|none],mount_tag=tag.
+
+
+	QEMU_OPTIONS="$QEMU_OPTIONS \
+-virtfs local,id=root,path=$ROOTFS,mount_tag=root,security_model=passthrough \
+-device virtio-9p-pci,fsdev=root,mount_tag=/dev/root"
+fi
+
+[ "$SMP" ] || SMP=1
+
+# User append args come last
+KERNEL_APPEND="$KERNEL_APPEND $KERNEL_APPEND2"
+
+############### Execution #################
+
+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.
+"
+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"
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 447+ messages in thread

end of thread, other threads:[~2012-05-11 15:46 UTC | newest]

Thread overview: 447+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-06  1:35 [PATCH] KVM: Add wrapper script around QEMU to test kernels Alexander Graf
2011-11-06  1:35 ` [Qemu-devel] " Alexander Graf
2011-11-06  1:35 ` Alexander Graf
2011-11-06  1:14 ` [Qemu-devel] " Andreas Färber
2011-11-06  1:14   ` Andreas Färber
2011-11-06 10:04 ` Pekka Enberg
2011-11-06 10:04   ` [Qemu-devel] " Pekka Enberg
2011-11-06 10:04   ` Pekka Enberg
2011-11-06 10:07   ` Avi Kivity
2011-11-06 10:07     ` [Qemu-devel] " Avi Kivity
2011-11-06 10:07     ` Avi Kivity
2011-11-06 10:12     ` Pekka Enberg
2011-11-06 10:12       ` [Qemu-devel] " Pekka Enberg
2011-11-06 10:12       ` Pekka Enberg
2011-11-06 10:23       ` Avi Kivity
2011-11-06 10:23         ` [Qemu-devel] " Avi Kivity
2011-11-06 10:23         ` Avi Kivity
2011-11-06 11:08         ` Pekka Enberg
2011-11-06 11:08           ` [Qemu-devel] " Pekka Enberg
2011-11-06 11:08           ` Pekka Enberg
2011-11-06 11:50           ` Avi Kivity
2011-11-06 11:50             ` [Qemu-devel] " Avi Kivity
2011-11-06 11:50             ` Avi Kivity
2011-11-06 12:14             ` Pekka Enberg
2011-11-06 12:14               ` [Qemu-devel] " Pekka Enberg
2011-11-06 12:14               ` Pekka Enberg
2011-11-06 12:27               ` Avi Kivity
2011-11-06 12:27                 ` [Qemu-devel] " Avi Kivity
2011-11-06 12:27                 ` Avi Kivity
2011-11-06 12:32                 ` Pekka Enberg
2011-11-06 12:32                   ` [Qemu-devel] " Pekka Enberg
2011-11-06 12:32                   ` Pekka Enberg
2011-11-06 12:43                   ` Avi Kivity
2011-11-06 12:43                     ` [Qemu-devel] " Avi Kivity
2011-11-06 12:43                     ` Avi Kivity
2011-11-06 13:06                     ` Pekka Enberg
2011-11-06 13:06                       ` [Qemu-devel] " Pekka Enberg
2011-11-06 13:06                       ` Pekka Enberg
2011-11-06 15:56                       ` Avi Kivity
2011-11-06 15:56                         ` [Qemu-devel] " Avi Kivity
2011-11-06 15:56                         ` Avi Kivity
2011-11-06 16:35                         ` Pekka Enberg
2011-11-06 16:35                           ` [Qemu-devel] " Pekka Enberg
2011-11-06 16:35                           ` Pekka Enberg
2011-11-06 16:50                           ` Avi Kivity
2011-11-06 16:50                             ` [Qemu-devel] " Avi Kivity
2011-11-06 17:08                             ` Anthony Liguori
2011-11-06 17:08                               ` Anthony Liguori
2011-11-06 17:08                               ` Anthony Liguori
2011-11-06 18:09                               ` [Qemu-devel] " Pekka Enberg
2011-11-06 18:09                                 ` Pekka Enberg
2011-11-06 18:09                                 ` Pekka Enberg
2011-11-07  1:38                                 ` [Qemu-devel] " Anthony Liguori
2011-11-07  1:38                                   ` Anthony Liguori
2011-11-07  1:38                                   ` Anthony Liguori
2011-11-07  6:45                                   ` [Qemu-devel] " Pekka Enberg
2011-11-07  6:45                                     ` Pekka Enberg
2011-11-06 18:31                               ` Ted Ts'o
2011-11-06 18:31                                 ` 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-06 23:19                                       ` Ted Ts'o
2011-11-07  6:42                                       ` Pekka Enberg
2011-11-07  6:42                                         ` Pekka Enberg
2011-11-07  6:42                                         ` Pekka Enberg
2011-11-07 17:03                                         ` [Qemu-devel] " Vince Weaver
2011-11-07 17:03                                           ` Vince Weaver
2011-11-07 17:03                                           ` Vince Weaver
2011-11-07 17:59                                           ` [Qemu-devel] " Ingo Molnar
2011-11-07 17:59                                             ` Ingo Molnar
2011-11-07 20:03                                             ` Frank Ch. Eigler
2011-11-07 20:03                                               ` Frank Ch. Eigler
2011-11-07 20:03                                               ` Frank Ch. Eigler
2011-11-07 20:09                                               ` [Qemu-devel] " Pekka Enberg
2011-11-07 20:09                                                 ` Pekka Enberg
2011-11-07 20:09                                                 ` Pekka Enberg
2011-11-07 20:35                                                 ` [Qemu-devel] " Ted Ts'o
2011-11-07 20:35                                                   ` Ted Ts'o
2011-11-08 10:22                                                   ` [F.A.Q.] perf ABI backwards and forwards compatibility Ingo Molnar
2011-11-08 10:22                                                     ` [Qemu-devel] " Ingo Molnar
2011-11-08 10:22                                                     ` Ingo Molnar
2011-11-08 10:32                                                     ` Peter Zijlstra
2011-11-08 10:32                                                       ` [Qemu-devel] " Peter Zijlstra
2011-11-08 10:32                                                       ` Peter Zijlstra
2011-11-08 11:34                                                       ` Ingo Molnar
2011-11-08 11:34                                                         ` [Qemu-devel] " Ingo Molnar
2011-11-08 10:41                                                     ` Theodore Tso
2011-11-08 10:41                                                       ` [Qemu-devel] " Theodore Tso
2011-11-08 11:20                                                       ` Pekka Enberg
2011-11-08 11:20                                                         ` [Qemu-devel] " Pekka Enberg
2011-11-08 11:20                                                         ` Pekka Enberg
2011-11-08 11:25                                                         ` Theodore Tso
2011-11-08 11:25                                                           ` [Qemu-devel] " Theodore Tso
2011-11-08 11:25                                                           ` Theodore Tso
2011-11-08 11:29                                                           ` Pekka Enberg
2011-11-08 11:29                                                             ` [Qemu-devel] " Pekka Enberg
2011-11-08 11:31                                                     ` Frank Ch. Eigler
2011-11-08 11:31                                                       ` [Qemu-devel] " Frank Ch. Eigler
2011-11-08 11:39                                                       ` Pekka Enberg
2011-11-08 11:39                                                         ` [Qemu-devel] " Pekka Enberg
2011-11-08 12:15                                                         ` Ingo Molnar
2011-11-08 12:15                                                           ` [Qemu-devel] " Ingo Molnar
2011-11-08 12:20                                                           ` Peter Zijlstra
2011-11-08 12:20                                                             ` [Qemu-devel] " Peter Zijlstra
2011-11-08 12:20                                                             ` Peter Zijlstra
2011-11-08 12:59                                                             ` Ingo Molnar
2011-11-08 12:59                                                               ` [Qemu-devel] " Ingo Molnar
2011-11-09 10:05                                                               ` Peter Zijlstra
2011-11-09 10:05                                                                 ` [Qemu-devel] " Peter Zijlstra
2011-11-09 10:05                                                                 ` Peter Zijlstra
2011-11-08  5:29                                             ` [Qemu-devel] [PATCH] KVM: Add wrapper script around QEMU to test kernels Vince Weaver
2011-11-08  5:29                                               ` Vince Weaver
2011-11-08 12:07                                               ` Ingo Molnar
2011-11-08 12:07                                                 ` Ingo Molnar
2011-11-08 12:07                                                 ` Ingo Molnar
2011-11-08 13:08                                                 ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-08 13:08                                                   ` Arnaldo Carvalho de Melo
2011-11-08 13:08                                                   ` Arnaldo Carvalho de Melo
2011-11-09  6:04                                                   ` [Qemu-devel] " Vince Weaver
2011-11-09  6:04                                                     ` Vince Weaver
2011-11-09  6:04                                                     ` Vince Weaver
2011-11-07 19:53                                           ` [Qemu-devel] " Pekka Enberg
2011-11-07 19:53                                             ` Pekka Enberg
2011-11-07 20:32                                             ` Ted Ts'o
2011-11-07 20:32                                               ` Ted Ts'o
2011-11-07 20:32                                               ` Ted Ts'o
2011-11-07 21:36                                               ` [Qemu-devel] " Pekka Enberg
2011-11-07 21:36                                               ` Pekka Enberg
2011-11-07 22:19                                                 ` Anthony Liguori
2011-11-07 22:19                                                   ` Anthony Liguori
2011-11-07 22:19                                                   ` Anthony Liguori
2011-11-07 23:42                                                   ` [Qemu-devel] " Theodore Tso
2011-11-07 23:42                                                     ` Theodore Tso
2011-11-07 23:42                                                     ` Theodore Tso
2011-11-08  9:32                                                     ` [F.A.Q.] the advantages of a shared tool/kernel Git repository, tools/perf/ and tools/kvm/ Ingo Molnar
2011-11-08  9:32                                                       ` [Qemu-devel] " Ingo Molnar
2011-11-08 10:21                                                       ` Theodore Tso
2011-11-08 10:21                                                         ` [Qemu-devel] " Theodore Tso
2011-11-08 10:21                                                         ` Theodore Tso
2011-11-08 12:55                                                         ` Ingo Molnar
2011-11-08 12:55                                                           ` [Qemu-devel] " Ingo Molnar
2011-11-08 12:55                                                           ` Ingo Molnar
2011-11-08 16:33                                                           ` Ted Ts'o
2011-11-08 16:33                                                             ` [Qemu-devel] " Ted Ts'o
2011-11-08 17:14                                                             ` Anca Emanuel
2011-11-08 17:14                                                             ` Anca Emanuel
2011-11-08 17:14                                                               ` [Qemu-devel] " Anca Emanuel
2011-11-08 19:24                                                               ` Ted Ts'o
2011-11-08 19:24                                                                 ` [Qemu-devel] " Ted Ts'o
2011-11-09  8:28                                                                 ` Ingo Molnar
2011-11-09  8:28                                                                 ` Ingo Molnar
2011-11-09  8:28                                                                   ` [Qemu-devel] " Ingo Molnar
2011-11-08 21:15                                                             ` John Kacur
2011-11-08 21:15                                                             ` John Kacur
2011-11-08 21:15                                                               ` [Qemu-devel] " John Kacur
2011-11-09  8:38                                                               ` Ingo Molnar
2011-11-09  8:38                                                                 ` [Qemu-devel] " Ingo Molnar
2011-11-09  8:38                                                                 ` Ingo Molnar
2011-11-09  8:23                                                             ` Ingo Molnar
2011-11-09  8:23                                                               ` [Qemu-devel] " Ingo Molnar
2011-11-10  1:41                                                               ` Alexander Graf
2011-11-10  1:41                                                                 ` [Qemu-devel] " Alexander Graf
2011-11-10  1:41                                                                 ` Alexander Graf
2011-11-10  8:14                                                                 ` Ingo Molnar
2011-11-10  8:14                                                                   ` [Qemu-devel] " Ingo Molnar
2011-11-10  8:14                                                                   ` Ingo Molnar
2011-11-09  8:23                                                             ` Ingo Molnar
2011-11-08 12:56                                                         ` Arnaldo Carvalho de Melo
2011-11-08 12:56                                                           ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-08 13:40                                                           ` Gerd Hoffmann
2011-11-08 13:40                                                             ` [Qemu-devel] " Gerd Hoffmann
2011-11-08 14:32                                                             ` Arnaldo Carvalho de Melo
2011-11-08 14:32                                                               ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-08 15:38                                                               ` Gerd Hoffmann
2011-11-08 15:38                                                                 ` [Qemu-devel] " Gerd Hoffmann
2011-11-08 16:13                                                                 ` Arnaldo Carvalho de Melo
2011-11-08 16:13                                                                   ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-09  8:55                                                                   ` Ingo Molnar
2011-11-09  8:55                                                                     ` [Qemu-devel] " Ingo Molnar
2011-11-09  8:55                                                                     ` Ingo Molnar
2011-11-09  8:51                                                                 ` Ingo Molnar
2011-11-09  8:51                                                                   ` [Qemu-devel] " Ingo Molnar
2011-11-09 10:40                                                                   ` Gerd Hoffmann
2011-11-09 10:40                                                                     ` [Qemu-devel] " Gerd Hoffmann
2011-11-09 10:50                                                                     ` Hagen Paul Pfeifer
2011-11-09 10:50                                                                       ` [Qemu-devel] " Hagen Paul Pfeifer
2011-11-09 11:55                                                                     ` Arnaldo Carvalho de Melo
2011-11-09 11:55                                                                       ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-09 11:55                                                                       ` Arnaldo Carvalho de Melo
2011-11-09 12:26                                                                       ` Gerd Hoffmann
2011-11-09 12:26                                                                         ` [Qemu-devel] " Gerd Hoffmann
2011-11-09 12:26                                                                         ` Gerd Hoffmann
2011-11-09 12:30                                                                         ` Arnaldo Carvalho de Melo
2011-11-09 12:30                                                                           ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-09 12:33                                                                           ` Arnaldo Carvalho de Melo
2011-11-09 12:33                                                                             ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-09 12:33                                                                             ` Arnaldo Carvalho de Melo
2011-11-09 12:46                                                                             ` Peter Zijlstra
2011-11-09 12:46                                                                               ` [Qemu-devel] " Peter Zijlstra
2011-11-09 12:46                                                                               ` Peter Zijlstra
2011-11-09 12:51                                                                               ` Arnaldo Carvalho de Melo
2011-11-09 12:51                                                                                 ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-09 12:51                                                                                 ` Arnaldo Carvalho de Melo
2011-11-09 13:17                                                                             ` Ingo Molnar
2011-11-09 13:17                                                                               ` [Qemu-devel] " Ingo Molnar
2011-11-09 19:25                                                                       ` Jim Paris
2011-11-09 19:25                                                                         ` [Qemu-devel] " Jim Paris
2011-11-09 19:25                                                                         ` Jim Paris
2011-11-09 20:13                                                                         ` Arnaldo Carvalho de Melo
2011-11-09 20:13                                                                           ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-09 20:13                                                                           ` Arnaldo Carvalho de Melo
2011-11-09 22:32                                                                           ` Anca Emanuel
2011-11-09 22:32                                                                             ` [Qemu-devel] " Anca Emanuel
2011-11-09 22:32                                                                             ` Anca Emanuel
2011-11-10  8:00                                                                             ` Ingo Molnar
2011-11-10  8:00                                                                               ` [Qemu-devel] " Ingo Molnar
2011-11-10  8:00                                                                               ` Ingo Molnar
2011-11-10  8:12                                                                               ` Anca Emanuel
2011-11-10  8:12                                                                                 ` [Qemu-devel] " Anca Emanuel
2011-11-10  8:12                                                                                 ` Anca Emanuel
2011-11-10  8:39                                                                         ` Gerd Hoffmann
2011-11-10  8:39                                                                           ` [Qemu-devel] " Gerd Hoffmann
2011-11-10  8:39                                                                           ` Gerd Hoffmann
2011-11-08 15:43                                                       ` Steven Rostedt
2011-11-08 15:43                                                         ` [Qemu-devel] " Steven Rostedt
2011-11-09  9:21                                                         ` Ingo Molnar
2011-11-09  9:21                                                           ` [Qemu-devel] " Ingo Molnar
2011-11-09  9:21                                                           ` Ingo Molnar
2011-11-09 12:03                                                           ` Arnaldo Carvalho de Melo
2011-11-09 12:03                                                             ` [Qemu-devel] " Arnaldo Carvalho de Melo
2011-11-09 12:03                                                             ` Arnaldo Carvalho de Melo
2011-11-09 13:40                                                       ` Américo Wang
2011-11-09 13:40                                                         ` [Qemu-devel] " Américo Wang
2011-11-10  7:47                                                         ` Ingo Molnar
2011-11-10  7:47                                                           ` [Qemu-devel] " Ingo Molnar
2011-11-10  7:47                                                           ` Ingo Molnar
2011-11-07 10:31                                 ` [Qemu-devel] [PATCH] KVM: Add wrapper script around QEMU to test kernels Kevin Wolf
2011-11-07 10:31                                   ` Kevin Wolf
2011-11-07 11:38                                   ` [Qemu-devel] " Pekka Enberg
2011-11-07 11:38                                     ` Pekka Enberg
2011-11-07 11:38                                     ` Pekka Enberg
2011-11-07 11:59                                     ` [Qemu-devel] " Kevin Wolf
2011-11-07 11:59                                       ` Kevin Wolf
2011-11-07 11:59                                       ` Kevin Wolf
2011-11-06 16:19                       ` Jan Kiszka
2011-11-06 16:19                         ` [Qemu-devel] " Jan Kiszka
2011-11-06 16:30                         ` Pekka Enberg
2011-11-06 16:30                           ` [Qemu-devel] " Pekka Enberg
2011-11-06 16:30                           ` Pekka Enberg
2011-11-06 16:39                           ` Jan Kiszka
2011-11-06 16:39                             ` [Qemu-devel] " Jan Kiszka
2011-11-06 16:39                             ` Jan Kiszka
2011-11-06 17:11                             ` Pekka Enberg
2011-11-06 17:11                               ` [Qemu-devel] " Pekka Enberg
2011-11-06 17:11                               ` Pekka Enberg
2011-11-06 17:23                               ` Jan Kiszka
2011-11-06 17:23                                 ` [Qemu-devel] " Jan Kiszka
2011-11-06 17:23                                 ` Jan Kiszka
2011-11-06 17:55                                 ` Pekka Enberg
2011-11-06 17:55                                   ` [Qemu-devel] " Pekka Enberg
2011-11-06 17:55                                   ` Pekka Enberg
2011-11-06 16:39                         ` Pekka Enberg
2011-11-06 16:39                           ` [Qemu-devel] " Pekka Enberg
2011-11-06 16:39                           ` Pekka Enberg
2011-11-07 10:11                         ` Gerd Hoffmann
2011-11-07 10:11                           ` [Qemu-devel] " Gerd Hoffmann
2011-11-07 10:11                           ` Gerd Hoffmann
2011-11-07 10:18                           ` Pekka Enberg
2011-11-07 10:18                             ` [Qemu-devel] " Pekka Enberg
2011-11-06 17:10                       ` Anthony Liguori
2011-11-06 17:10                         ` Anthony Liguori
2011-11-06 17:10                         ` Anthony Liguori
2011-11-06 17:15                       ` Alexander Graf
2011-11-06 17:15                         ` [Qemu-devel] " Alexander Graf
2011-11-06 17:15                         ` Alexander Graf
2011-11-06 17:28                         ` Pekka Enberg
2011-11-06 17:28                           ` [Qemu-devel] " Pekka Enberg
2011-11-06 17:28                           ` Pekka Enberg
2011-11-06 17:30                           ` Alexander Graf
2011-11-06 17:30                             ` [Qemu-devel] " Alexander Graf
2011-11-06 17:30                             ` Alexander Graf
2011-11-06 18:05                             ` Pekka Enberg
2011-11-06 18:05                               ` [Qemu-devel] " Pekka Enberg
2011-11-06 18:05                               ` Pekka Enberg
2011-11-06 19:14                               ` Paolo Bonzini
2011-11-06 19:14                                 ` [Qemu-devel] " Paolo Bonzini
2011-11-06 19:14                                 ` Paolo Bonzini
2011-11-06 19:19                                 ` Pekka Enberg
2011-11-06 19:19                                   ` [Qemu-devel] " Pekka Enberg
2011-11-06 19:19                                   ` Pekka Enberg
2011-11-06 22:08                             ` Frank Ch. Eigler
2011-11-06 22:08                               ` [Qemu-devel] " Frank Ch. Eigler
2011-11-06 22:08                               ` Frank Ch. Eigler
2011-11-07  6:58                               ` Pekka Enberg
2011-11-07  6:58                                 ` [Qemu-devel] " Pekka Enberg
2011-11-07  6:58                                 ` Pekka Enberg
2011-11-06 19:11                           ` Paolo Bonzini
2011-11-06 19:11                             ` [Qemu-devel] " Paolo Bonzini
2011-11-06 19:11                             ` Paolo Bonzini
2011-11-06 19:17                             ` Pekka Enberg
2011-11-06 19:17                               ` [Qemu-devel] " Pekka Enberg
2011-11-06 20:01                               ` Paolo Bonzini
2011-11-06 20:01                                 ` [Qemu-devel] " Paolo Bonzini
2011-11-06 20:01                                 ` Paolo Bonzini
2011-11-06 20:17                                 ` Pekka Enberg
2011-11-06 20:17                                   ` [Qemu-devel] " Pekka Enberg
2011-11-06 20:17                                   ` Pekka Enberg
2011-11-07  8:00                                   ` Paolo Bonzini
2011-11-07  8:00                                     ` [Qemu-devel] " Paolo Bonzini
2011-11-07  8:00                                     ` Paolo Bonzini
2011-11-07  8:09                                     ` Pekka Enberg
2011-11-07  8:09                                       ` [Qemu-devel] " Pekka Enberg
2011-11-07  8:09                                       ` Pekka Enberg
2011-11-07  8:20                                       ` Paolo Bonzini
2011-11-07  8:20                                         ` [Qemu-devel] " Paolo Bonzini
2011-11-07  8:20                                         ` Paolo Bonzini
2011-11-07  8:45                                         ` Pekka Enberg
2011-11-07  8:45                                           ` [Qemu-devel] " Pekka Enberg
2011-11-07  8:45                                           ` Pekka Enberg
2011-11-07  8:52                                           ` Paolo Bonzini
2011-11-07  8:52                                             ` [Qemu-devel] " Paolo Bonzini
2011-11-07  8:52                                             ` Paolo Bonzini
2011-11-07  8:57                                             ` Pekka Enberg
2011-11-07  8:57                                               ` [Qemu-devel] " Pekka Enberg
2011-11-07  8:57                                               ` Pekka Enberg
2011-11-07  8:13                                     ` Pekka Enberg
2011-11-07  8:13                                       ` [Qemu-devel] " Pekka Enberg
2011-11-07  8:13                                       ` Pekka Enberg
2011-11-06 20:31                                 ` Pekka Enberg
2011-11-06 20:31                                   ` [Qemu-devel] " Pekka Enberg
2011-11-06 20:31                                   ` Pekka Enberg
2011-11-07 10:23                           ` Gerd Hoffmann
2011-11-07 10:23                             ` [Qemu-devel] " Gerd Hoffmann
2011-11-07 10:23                             ` Gerd Hoffmann
2011-11-07 10:30                             ` [Qemu-devel] " Sasha Levin
2011-11-07 10:30                               ` Sasha Levin
2011-11-07 10:30                               ` Sasha Levin
2011-11-07 11:02                               ` Paolo Bonzini
2011-11-07 11:02                                 ` [Qemu-devel] " Paolo Bonzini
2011-11-07 11:02                                 ` Paolo Bonzini
2011-11-07 11:44                                 ` Pekka Enberg
2011-11-07 11:44                                   ` [Qemu-devel] " Pekka Enberg
2011-11-07 11:44                                   ` Pekka Enberg
2011-11-07 12:18                                   ` Gerd Hoffmann
2011-11-07 12:18                                     ` [Qemu-devel] " Gerd Hoffmann
2011-11-07 12:18                                     ` Gerd Hoffmann
2011-11-07 12:21                                     ` Pekka Enberg
2011-11-07 12:21                                       ` [Qemu-devel] " Pekka Enberg
2011-11-07 12:21                                       ` Pekka Enberg
2011-11-07 12:26                               ` [Qemu-devel] " Avi Kivity
2011-11-07 12:26                                 ` Avi Kivity
2011-11-07 12:26                                 ` Avi Kivity
2011-11-07 12:29                                 ` [Qemu-devel] " Pekka Enberg
2011-11-07 12:29                                   ` Pekka Enberg
2011-11-07 12:29                                   ` Pekka Enberg
2011-11-07 12:43                                   ` [Qemu-devel] " Ted Ts'o
2011-11-07 12:43                                     ` Ted Ts'o
2011-11-07 12:43                                     ` Ted Ts'o
2011-11-07 12:44                                   ` [Qemu-devel] " Avi Kivity
2011-11-07 12:44                                     ` Avi Kivity
2011-11-07 12:44                                     ` Avi Kivity
2011-11-07 11:34                             ` Pekka Enberg
2011-11-07 11:34                               ` [Qemu-devel] " Pekka Enberg
2011-11-07 11:57                               ` Ingo Molnar
2011-11-07 11:57                                 ` [Qemu-devel] " Ingo Molnar
2011-11-07 11:57                                 ` Ingo Molnar
2011-11-07 13:17                                 ` [Qemu-devel] " Anthony Liguori
2011-11-07 13:17                                   ` Anthony Liguori
2011-11-07 12:08                               ` Gerd Hoffmann
2011-11-07 12:08                                 ` [Qemu-devel] " Gerd Hoffmann
2011-11-07 12:29                                 ` Ted Ts'o
2011-11-07 12:29                                   ` [Qemu-devel] " Ted Ts'o
2011-11-07 12:42                                   ` Pekka Enberg
2011-11-07 12:42                                   ` Pekka Enberg
2011-11-07 12:42                                     ` [Qemu-devel] " Pekka Enberg
2011-11-07 12:47                                     ` Ted Ts'o
2011-11-07 12:47                                       ` [Qemu-devel] " Ted Ts'o
2011-11-07 12:47                                       ` Ted Ts'o
2011-11-07 12:59                                       ` Pekka Enberg
2011-11-07 12:59                                         ` [Qemu-devel] " 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-07 13:12                                         ` [Qemu-devel] " Pekka Enberg
2011-11-08 13:29                                         ` Karel Zak
2011-11-08 13:29                                           ` [Qemu-devel] " Karel Zak
2011-11-08 14:30                                           ` Pekka Enberg
2011-11-08 14:30                                             ` [Qemu-devel] " Pekka Enberg
2011-11-08 14:30                                             ` Pekka Enberg
2011-11-06 13:11                     ` Pekka Enberg
2011-11-06 13:11                       ` [Qemu-devel] " Pekka Enberg
2011-11-06 13:11                       ` Pekka Enberg
2011-11-06 17:09                       ` Alexander Graf
2011-11-06 17:09                         ` [Qemu-devel] " Alexander Graf
2011-11-06 12:27             ` Pekka Enberg
2011-11-06 12:27               ` [Qemu-devel] " Pekka Enberg
2011-11-06 12:27               ` Pekka Enberg
2011-11-08 14:41 ` Avi Kivity
2011-11-08 14:41   ` [Qemu-devel] " Avi Kivity
2011-11-08 14:52   ` Christoph Hellwig
2011-11-08 14:52     ` [Qemu-devel] " Christoph Hellwig
2011-11-08 14:55     ` Sasha Levin
2011-11-08 14:55       ` [Qemu-devel] " Sasha Levin
2011-11-08 14:55       ` Sasha Levin
2011-11-08 14:57     ` Avi Kivity
2011-11-08 14:57       ` [Qemu-devel] " Avi Kivity
2011-11-08 14:57       ` Avi Kivity
2011-11-08 14:59       ` Christoph Hellwig
2011-11-08 14:59         ` [Qemu-devel] " Christoph Hellwig
2011-11-08 17:34         ` Alexander Graf
2011-11-08 17:34           ` [Qemu-devel] " Alexander Graf
2011-11-08 17:36           ` Avi Kivity
2011-11-08 17:36             ` [Qemu-devel] " Avi Kivity
2011-11-08 15:04     ` Jan Kiszka
2011-11-08 15:04       ` [Qemu-devel] " Jan Kiszka
2011-11-08 15:26     ` Pekka Enberg
2011-11-08 15:26       ` [Qemu-devel] " Pekka Enberg
2011-11-08 15:26       ` Pekka Enberg
2011-11-08 15:28       ` Christoph Hellwig
2011-11-08 15:28         ` [Qemu-devel] " Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2012-05-11 15:46 Alexander Graf
2011-11-07 14:34 青云
2011-08-24 21:38 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-08-23 22:16 [PATCH] KVM: Add wrapper script around Qemu " Alexander Graf
2011-08-23 22:16 ` Alexander Graf
2011-08-24  5:19 ` Pekka Enberg
2011-08-24  5:19   ` Pekka Enberg
2011-08-24  5:31   ` Américo Wang
2011-08-24  5:31     ` Américo Wang
2011-08-24 20:35     ` Alexander Graf
2011-08-24 20:35       ` Alexander Graf
2011-08-25  3:44       ` Américo Wang
2011-08-25  3:44         ` Américo Wang
2011-11-05 23:47         ` Alexander Graf
2011-11-05 23:47           ` Alexander Graf
2011-08-24  8:25 ` Avi Kivity
2011-08-24  9:16   ` Jan Kiszka
2011-08-24 21:06     ` Alexander Graf
2011-08-24 21:06       ` Alexander Graf
2011-08-24 17:40 ` [Qemu-devel] " Blue Swirl
2011-08-24 19:17   ` Avi Kivity

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.