Patchwork qemux86-64: Support for KVM, paravirt and virtio added

login
register
mail settings
Submitter Cristian Iorga
Date Sept. 18, 2012, 12:57 p.m.
Message ID <1347973078-12399-1-git-send-email-cristian.iorga@intel.com>
Download mbox | patch
Permalink /patch/36737/
State Accepted
Commit cbb6431b3ee9128ea15c9ae0a19e7d2998ffc561
Headers show

Comments

Cristian Iorga - Sept. 18, 2012, 12:57 p.m.
KVM, paravirtualization and virtio drivers are now activated
    in runqemu using the kvm option flag for qemux86-64.
    Host CPU features are also exported to guest OS (Yocto Linux).
    Usage example: runqemu qemux86-64 core-image-x11 kvm

    Implements [YOCTO #2550].

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
---
 meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
 scripts/runqemu-internal                     |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Saul Wold - Sept. 19, 2012, 2:29 a.m.
On 09/18/2012 05:57 AM, Cristian Iorga wrote:
>      KVM, paravirtualization and virtio drivers are now activated
>      in runqemu using the kvm option flag for qemux86-64.
>      Host CPU features are also exported to guest OS (Yocto Linux).
>      Usage example: runqemu qemux86-64 core-image-x11 kvm
>
>      Implements [YOCTO #2550].
>
> Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
> ---
>   meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
>   scripts/runqemu-internal                     |    4 ++--
>   2 files changed, 4 insertions(+), 3 deletions(-)
>

This seems to be an incremental change over the last one, and I have 
lost track of which applies against which, can you please resend a 
versioned patch (ie [PATCH v2] ) that is complete.

Thanks
	Sau!

> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> index 32ae02b..06dd677 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> @@ -15,7 +15,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckou
>
>   LINUX_VERSION ?= "3.4.10"
>
> -PR = "${INC_PR}.1"
> +PR = "${INC_PR}.3"
>   PV = "${LINUX_VERSION}+git${SRCPV}"
>
>   KMETA = "meta"
> @@ -28,4 +28,5 @@ KERNEL_FEATURES_append = " features/netfilter"
>   KERNEL_FEATURES_append_qemux86=" cfg/sound"
>   KERNEL_FEATURES_append_qemux86-64=" cfg/sound"
>   KERNEL_FEATURES_append_qemux86=" cfg/paravirt_kvm"
> +KERNEL_FEATURES_append_qemux86-64=" cfg/paravirt_kvm"
>   KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32", "" ,d)}"
> diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
> index f2c8d83..6e20dd7 100755
> --- a/scripts/runqemu-internal
> +++ b/scripts/runqemu-internal
> @@ -350,8 +350,8 @@ if [ "$MACHINE" = "qemux86-64" ]; then
>       QEMU=qemu-system-x86_64
>       QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
>       if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
> -        KERNCMDLINE="vga=0 root=/dev/hda rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
> -        QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $ROOTFS $QEMU_UI_OPTIONS"
> +        KERNCMDLINE="vga=0 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
> +        QEMUOPTIONS="$QEMU_NETWORK_CMD $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
>       fi
>       if [ "$FSTYPE" = "nfs" ]; then
>           if [ "x$ROOTFS" = "x" ]; then
>
Cristian Iorga - Sept. 19, 2012, 6:20 a.m.
Actually, there are two patches.
One for qemux86 and one for qemux86-64.
The one for qemux86-64 is dependent of the qemux86 one.

Anyhow, if I will resend both of them with a cover letter.

Regards,
Cristian

-----Original Message-----
From: Saul Wold [mailto:sgw@linux.intel.com] 
Sent: Wednesday, September 19, 2012 5:30 AM
To: Iorga, Cristian
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] qemux86-64: Support for KVM, paravirt and virtio added

On 09/18/2012 05:57 AM, Cristian Iorga wrote:
>      KVM, paravirtualization and virtio drivers are now activated
>      in runqemu using the kvm option flag for qemux86-64.
>      Host CPU features are also exported to guest OS (Yocto Linux).
>      Usage example: runqemu qemux86-64 core-image-x11 kvm
>
>      Implements [YOCTO #2550].
>
> Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
> ---
>   meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
>   scripts/runqemu-internal                     |    4 ++--
>   2 files changed, 4 insertions(+), 3 deletions(-)
>

This seems to be an incremental change over the last one, and I have lost track of which applies against which, can you please resend a versioned patch (ie [PATCH v2] ) that is complete.

Thanks
	Sau!

> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb 
> b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> index 32ae02b..06dd677 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
> @@ -15,7 +15,7 @@ SRC_URI = 
> "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckou
>
>   LINUX_VERSION ?= "3.4.10"
>
> -PR = "${INC_PR}.1"
> +PR = "${INC_PR}.3"
>   PV = "${LINUX_VERSION}+git${SRCPV}"
>
>   KMETA = "meta"
> @@ -28,4 +28,5 @@ KERNEL_FEATURES_append = " features/netfilter"
>   KERNEL_FEATURES_append_qemux86=" cfg/sound"
>   KERNEL_FEATURES_append_qemux86-64=" cfg/sound"
>   KERNEL_FEATURES_append_qemux86=" cfg/paravirt_kvm"
> +KERNEL_FEATURES_append_qemux86-64=" cfg/paravirt_kvm"
>   KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32", "" ,d)}"
> diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index 
> f2c8d83..6e20dd7 100755
> --- a/scripts/runqemu-internal
> +++ b/scripts/runqemu-internal
> @@ -350,8 +350,8 @@ if [ "$MACHINE" = "qemux86-64" ]; then
>       QEMU=qemu-system-x86_64
>       QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
>       if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
> -        KERNCMDLINE="vga=0 root=/dev/hda rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
> -        QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $ROOTFS $QEMU_UI_OPTIONS"
> +        KERNCMDLINE="vga=0 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
> +        QEMUOPTIONS="$QEMU_NETWORK_CMD $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
>       fi
>       if [ "$FSTYPE" = "nfs" ]; then
>           if [ "x$ROOTFS" = "x" ]; then
>

Patch

diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
index 32ae02b..06dd677 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
@@ -15,7 +15,7 @@  SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckou
 
 LINUX_VERSION ?= "3.4.10"
 
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.3"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 KMETA = "meta"
@@ -28,4 +28,5 @@  KERNEL_FEATURES_append = " features/netfilter"
 KERNEL_FEATURES_append_qemux86=" cfg/sound"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound"
 KERNEL_FEATURES_append_qemux86=" cfg/paravirt_kvm"
+KERNEL_FEATURES_append_qemux86-64=" cfg/paravirt_kvm"
 KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32", "" ,d)}"
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index f2c8d83..6e20dd7 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -350,8 +350,8 @@  if [ "$MACHINE" = "qemux86-64" ]; then
     QEMU=qemu-system-x86_64
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
     if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
-        KERNCMDLINE="vga=0 root=/dev/hda rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
-        QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $ROOTFS $QEMU_UI_OPTIONS"
+        KERNCMDLINE="vga=0 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
+        QEMUOPTIONS="$QEMU_NETWORK_CMD $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
     fi
     if [ "$FSTYPE" = "nfs" ]; then
         if [ "x$ROOTFS" = "x" ]; then