All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag.
@ 2013-10-06 21:22 Chris Patterson
  2013-10-06 21:22 ` [PATCH] xen: add INSANE_SKIP flag 'already-stripped' to silence QA warnings about stripped qemu binaries Chris Patterson
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Chris Patterson @ 2013-10-06 21:22 UTC (permalink / raw)
  To: meta-virtualization

Signed-off-by: Chris Patterson <cjp256@gmail.com>
---
 recipes-kernel/linux/linux-yocto/xen-guest.cfg | 55 ++++++++++++++++++++++++++
 recipes-kernel/linux/linux-yocto/xen-guest.scc |  4 ++
 recipes-kernel/linux/linux-yocto_3.10.bbappend |  3 ++
 recipes-kernel/linux/linux-yocto_3.4.bbappend  |  3 ++
 recipes-kernel/linux/linux-yocto_3.8.bbappend  |  3 ++
 5 files changed, 68 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-yocto/xen-guest.cfg
 create mode 100644 recipes-kernel/linux/linux-yocto/xen-guest.scc

diff --git a/recipes-kernel/linux/linux-yocto/xen-guest.cfg b/recipes-kernel/linux/linux-yocto/xen-guest.cfg
new file mode 100644
index 0000000..cbde3cc
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/xen-guest.cfg
@@ -0,0 +1,55 @@
+###
+# linux 3.4, 3.8
+CONFIG_PARAVIRT_GUEST=y
+###
+
+###
+# linux 3.10
+CONFIG_HYPERVISOR_GUEST=y
+###
+
+CONFIG_PARAVIRT=y
+CONFIG_XEN=y
+CONFIG_XEN_DOM0=y
+CONFIG_XEN_PRIVILEGED_GUEST=y
+CONFIG_XEN_PVHVM=y
+CONFIG_XEN_MAX_DOMAIN_MEMORY=500
+CONFIG_XEN_SAVE_RESTORE=y
+CONFIG_KVM_GUEST=y
+CONFIG_PARAVIRT_CLOCK=y
+CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_PCI_XEN=y
+CONFIG_XEN_PCIDEV_FRONTEND=m
+CONFIG_SYS_HYPERVISOR=y
+CONFIG_XEN_BLKDEV_FRONTEND=y
+CONFIG_XEN_BLKDEV_BACKEND=m
+CONFIG_XEN_NETDEV_FRONTEND=y
+CONFIG_XEN_NETDEV_BACKEND=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
+CONFIG_HVC_IRQ=y
+CONFIG_HVC_XEN=y
+CONFIG_HVC_XEN_FRONTEND=y
+CONFIG_XEN_WDT=m
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+CONFIG_FB_SYS_FOPS=y
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_XEN_FBDEV_FRONTEND=y
+CONFIG_XEN_BALLOON=y
+CONFIG_XEN_SCRUB_PAGES=y
+CONFIG_XEN_DEV_EVTCHN=y
+CONFIG_XEN_BACKEND=y
+CONFIG_XENFS=y
+CONFIG_XEN_COMPAT_XENFS=y
+CONFIG_XEN_SYS_HYPERVISOR=y
+CONFIG_XEN_XENBUS_FRONTEND=y
+CONFIG_XEN_GNTDEV=y
+CONFIG_XEN_GRANT_DEV_ALLOC=y
+CONFIG_SWIOTLB_XEN=y
+CONFIG_XEN_PCIDEV_BACKEND=m
+CONFIG_XEN_PRIVCMD=m
+CONFIG_XEN_ACPI_PROCESSOR=m
+CONFIG_XEN_MCE_LOG=y
+CONFIG_XEN_HAVE_PVMMU=y
diff --git a/recipes-kernel/linux/linux-yocto/xen-guest.scc b/recipes-kernel/linux/linux-yocto/xen-guest.scc
new file mode 100644
index 0000000..575bc43
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/xen-guest.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Xen PV Guest Support"
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware xen-guest.cfg
diff --git a/recipes-kernel/linux/linux-yocto_3.10.bbappend b/recipes-kernel/linux/linux-yocto_3.10.bbappend
index cc7fd98..a3165cd 100644
--- a/recipes-kernel/linux/linux-yocto_3.10.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -17,3 +17,6 @@ KERNEL_FEATURES_append += "${@base_contains('DISTRO_FEATURES', 'aufs', ' feature
 
 # xen dom0 kernel support
 SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
+
+# xen guest kernel support
+SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', ' file://xen-guest.scc', '', d)}"
diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend
index 448d57f..4d3a0d1 100644
--- a/recipes-kernel/linux/linux-yocto_3.4.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend
@@ -14,3 +14,6 @@ module_autoload_kvm-intel = "kvm-intel"
 
 # xen dom0 kernel support
 SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
+
+# xen guest kernel support
+SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', ' file://xen-guest.scc', '', d)}"
diff --git a/recipes-kernel/linux/linux-yocto_3.8.bbappend b/recipes-kernel/linux/linux-yocto_3.8.bbappend
index cc7fd98..a3165cd 100644
--- a/recipes-kernel/linux/linux-yocto_3.8.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.8.bbappend
@@ -17,3 +17,6 @@ KERNEL_FEATURES_append += "${@base_contains('DISTRO_FEATURES', 'aufs', ' feature
 
 # xen dom0 kernel support
 SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
+
+# xen guest kernel support
+SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', ' file://xen-guest.scc', '', d)}"
-- 
1.8.4.rc3



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

* [PATCH] xen: add INSANE_SKIP flag 'already-stripped' to silence QA warnings about stripped qemu binaries.
  2013-10-06 21:22 [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Chris Patterson
@ 2013-10-06 21:22 ` Chris Patterson
  2013-10-07 17:16   ` Philip Tricca
  2013-10-06 21:22 ` [PATCH] xen: Add sdl support by including dependency for libsdl Chris Patterson
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Chris Patterson @ 2013-10-06 21:22 UTC (permalink / raw)
  To: meta-virtualization

Signed-off-by: Chris Patterson <cjp256@gmail.com>
---
 recipes-extended/xen/xen_4.3.0.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-extended/xen/xen_4.3.0.bb b/recipes-extended/xen/xen_4.3.0.bb
index 9cbd2ac..e9a22cc 100644
--- a/recipes-extended/xen/xen_4.3.0.bb
+++ b/recipes-extended/xen/xen_4.3.0.bb
@@ -299,6 +299,7 @@ FILES_${PN}-python = "\
     ${libdir}/python2.7 \
     "
 
+INSANE_SKIP_${PN} = "already-stripped"
 INSANE_SKIP_${PN}-qemu = "arch"
 FILES_${PN}-qemu = " \
     ${datadir}/xen/qemu \
-- 
1.8.4.rc3



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

* [PATCH] xen: Add sdl support by including dependency for libsdl.
  2013-10-06 21:22 [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Chris Patterson
  2013-10-06 21:22 ` [PATCH] xen: add INSANE_SKIP flag 'already-stripped' to silence QA warnings about stripped qemu binaries Chris Patterson
@ 2013-10-06 21:22 ` Chris Patterson
  2013-10-06 21:22 ` [PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment Chris Patterson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Chris Patterson @ 2013-10-06 21:22 UTC (permalink / raw)
  To: meta-virtualization

Signed-off-by: Chris Patterson <cjp256@gmail.com>
---
 recipes-extended/xen/xen_4.3.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-extended/xen/xen_4.3.0.bb b/recipes-extended/xen/xen_4.3.0.bb
index 233be99..9cbd2ac 100644
--- a/recipes-extended/xen/xen_4.3.0.bb
+++ b/recipes-extended/xen/xen_4.3.0.bb
@@ -17,13 +17,13 @@ COMPATIBLE_HOST = '(x86_64.*).*-linux'
 
 inherit autotools gettext setuptools update-rc.d
 
-DEPENDS = "util-linux util-linux-native file-native zlib ncurses openssl bison-native flex-native gettext dev86-native iasl-native pciutils virtual/libgl virtual/libsdl bridge-utils iproute2 procps yajl pixman python python-setuptools-native xz xz-native"
+DEPENDS = "util-linux util-linux-native file-native zlib ncurses openssl bison-native flex-native gettext dev86-native iasl-native pciutils virtual/libgl virtual/libsdl bridge-utils iproute2 procps yajl pixman python python-setuptools-native xz xz-native libsdl"
 
 # inherit setuptools adds python to RDEPENDS, override it
 RDEPENDS_${PN} = ""
 
 RDEPENDS_${PN}-base = "\
-    libgcc udev bash perl xz \
+    libgcc libsdl udev bash perl xz \
     ${PN}-blktap \
     ${PN}-console \
     ${PN}-libblktapctl \
-- 
1.8.4.rc3



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

* [PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment.
  2013-10-06 21:22 [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Chris Patterson
  2013-10-06 21:22 ` [PATCH] xen: add INSANE_SKIP flag 'already-stripped' to silence QA warnings about stripped qemu binaries Chris Patterson
  2013-10-06 21:22 ` [PATCH] xen: Add sdl support by including dependency for libsdl Chris Patterson
@ 2013-10-06 21:22 ` Chris Patterson
  2013-10-07 17:21   ` Philip Tricca
  2013-10-06 21:22 ` [PATCH] xen-image-minimal: break out arguments for xen and linux kernel as variables SYSLINUX_XEN_ARGS and SYSLINUX_KERNEL_ARGS to allow modification/overwriting Chris Patterson
  2013-10-07 17:22 ` [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Philip Tricca
  4 siblings, 1 reply; 10+ messages in thread
From: Chris Patterson @ 2013-10-06 21:22 UTC (permalink / raw)
  To: meta-virtualization

Signed-off-by: Chris Patterson <cjp256@gmail.com>
---
 recipes-extended/images/xen-guest-image-minimal.bb | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 recipes-extended/images/xen-guest-image-minimal.bb

diff --git a/recipes-extended/images/xen-guest-image-minimal.bb b/recipes-extended/images/xen-guest-image-minimal.bb
new file mode 100644
index 0000000..05b0b61
--- /dev/null
+++ b/recipes-extended/images/xen-guest-image-minimal.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "A Xen PV guest image."
+
+inherit core-image
+
+IMAGE_INSTALL += " \
+    packagegroup-core-boot \
+    kernel-module-xen-acpi-processor \
+    kernel-module-xen-blkback \
+    kernel-module-xen-netback \
+    kernel-module-xen-pciback \
+    kernel-module-xen-pcifront \
+    "
+
+IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', ' xf86-video-fbdev', '', d)}"
+IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', ' xf86-video-vesa', '', d)}"
+
+LICENSE = "MIT"
+
+SYSLINUX_KERNEL_ARGS ?= "LABEL=boot ramdisk_size=32768 root=/dev/ram0 rootimg=rootfs.img rw console=hvc0 console=tty0 panic=10 debugshell=5"
+
+# syslinux is not required for PV guest configuration, but for HVM
+build_syslinux_cfg () {
+	echo "ALLOWOPTIONS 1" > ${SYSLINUXCFG}
+	echo "DEFAULT boot" >> ${SYSLINUXCFG}
+	echo "TIMEOUT 10" >> ${SYSLINUXCFG}
+	echo "PROMPT 1" >> ${SYSLINUXCFG}
+	echo "LABEL boot" >> ${SYSLINUXCFG}
+	echo "  KERNEL /vmlinuz" >> ${SYSLINUXCFG}
+	echo "  INITRD /initrd" >> ${SYSLINUXCFG}
+	echo "  APPEND ${SYSLINUX_KERNEL_ARGS}" >> ${SYSLINUXCFG}
+}
-- 
1.8.4.rc3



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

* [PATCH] xen-image-minimal: break out arguments for xen and linux kernel as variables SYSLINUX_XEN_ARGS and SYSLINUX_KERNEL_ARGS to allow modification/overwriting.
  2013-10-06 21:22 [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Chris Patterson
                   ` (2 preceding siblings ...)
  2013-10-06 21:22 ` [PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment Chris Patterson
@ 2013-10-06 21:22 ` Chris Patterson
  2013-10-07 17:22 ` [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Philip Tricca
  4 siblings, 0 replies; 10+ messages in thread
From: Chris Patterson @ 2013-10-06 21:22 UTC (permalink / raw)
  To: meta-virtualization

Signed-off-by: Chris Patterson <cjp256@gmail.com>
---
 recipes-extended/images/xen-image-minimal.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/recipes-extended/images/xen-image-minimal.bb b/recipes-extended/images/xen-image-minimal.bb
index 23c4911..c582f57 100644
--- a/recipes-extended/images/xen-image-minimal.bb
+++ b/recipes-extended/images/xen-image-minimal.bb
@@ -42,6 +42,9 @@ populate_append() {
 	install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}/xen.gz
 }
 
+SYSLINUX_XEN_ARGS ?= "loglvl=all guest_loglvl=all console=com1,vga com1=115200,8n1"
+SYSLINUX_KERNEL_ARGS ?= "ramdisk_size=32768 root=/dev/ram0 rw console=hvc0 earlyprintk=xen console=tty0 panic=10 LABEL=boot debugshell=5"
+
 build_syslinux_cfg () {
 	echo "ALLOWOPTIONS 1" > ${SYSLINUXCFG}
 	echo "DEFAULT boot" >> ${SYSLINUXCFG}
@@ -49,6 +52,6 @@ build_syslinux_cfg () {
 	echo "PROMPT 1" >> ${SYSLINUXCFG}
 	echo "LABEL boot" >> ${SYSLINUXCFG}
 	echo "  KERNEL mboot.c32" >> ${SYSLINUXCFG}
-	echo "  APPEND /xen.gz loglvl=all guest_loglvl=all console=com1,vga com1=115200,8n1 --- /vmlinuz ramdisk_size=32768 root=/dev/ram0 rw console=hvc0 earlyprintk=xen console=tty0 panic=10 LABEL=boot debugshell=5 --- /initrd" >> ${SYSLINUXCFG}
+	echo "  APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUXCFG}
 }
 
-- 
1.8.4.rc3



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

* Re: [PATCH] xen: add INSANE_SKIP flag 'already-stripped' to silence QA warnings about stripped qemu binaries.
  2013-10-06 21:22 ` [PATCH] xen: add INSANE_SKIP flag 'already-stripped' to silence QA warnings about stripped qemu binaries Chris Patterson
@ 2013-10-07 17:16   ` Philip Tricca
  0 siblings, 0 replies; 10+ messages in thread
From: Philip Tricca @ 2013-10-07 17:16 UTC (permalink / raw)
  To: meta-virtualization

+1 on this

On 10/06/2013 05:22 PM, Chris Patterson wrote:
> Signed-off-by: Chris Patterson <cjp256@gmail.com>
> ---
>  recipes-extended/xen/xen_4.3.0.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/recipes-extended/xen/xen_4.3.0.bb b/recipes-extended/xen/xen_4.3.0.bb
> index 9cbd2ac..e9a22cc 100644
> --- a/recipes-extended/xen/xen_4.3.0.bb
> +++ b/recipes-extended/xen/xen_4.3.0.bb
> @@ -299,6 +299,7 @@ FILES_${PN}-python = "\
>      ${libdir}/python2.7 \
>      "
>  
> +INSANE_SKIP_${PN} = "already-stripped"
>  INSANE_SKIP_${PN}-qemu = "arch"
>  FILES_${PN}-qemu = " \
>      ${datadir}/xen/qemu \
> 



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

* Re: [PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment.
  2013-10-06 21:22 ` [PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment Chris Patterson
@ 2013-10-07 17:21   ` Philip Tricca
  2013-10-08 12:09     ` Chris Patterson
  0 siblings, 1 reply; 10+ messages in thread
From: Philip Tricca @ 2013-10-07 17:21 UTC (permalink / raw)
  To: Chris Patterson; +Cc: meta-virtualization

I'm a bit confused about this one. Maybe it's my misunderstanding. Questions in line:

On 10/06/2013 05:22 PM, Chris Patterson wrote:
> Signed-off-by: Chris Patterson <cjp256@gmail.com>
> ---
>  recipes-extended/images/xen-guest-image-minimal.bb | 31 ++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 recipes-extended/images/xen-guest-image-minimal.bb
> 
> diff --git a/recipes-extended/images/xen-guest-image-minimal.bb b/recipes-extended/images/xen-guest-image-minimal.bb
> new file mode 100644
> index 0000000..05b0b61
> --- /dev/null
> +++ b/recipes-extended/images/xen-guest-image-minimal.bb
> @@ -0,0 +1,31 @@
> +DESCRIPTION = "A Xen PV guest image."
> +
> +inherit core-image
> +
> +IMAGE_INSTALL += " \
> +    packagegroup-core-boot \
> +    kernel-module-xen-acpi-processor \
> +    kernel-module-xen-blkback \
> +    kernel-module-xen-netback \
> +    kernel-module-xen-pciback \

For a minimal guest I'd expect you wouldn't want any of the *back drivers. Did you mean for these to be the *front drivers?

Cheers,
- Philip

> +    kernel-module-xen-pcifront \
> +    "
> +
> +IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', ' xf86-video-fbdev', '', d)}"
> +IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', ' xf86-video-vesa', '', d)}"
> +
> +LICENSE = "MIT"
> +
> +SYSLINUX_KERNEL_ARGS ?= "LABEL=boot ramdisk_size=32768 root=/dev/ram0 rootimg=rootfs.img rw console=hvc0 console=tty0 panic=10 debugshell=5"
> +
> +# syslinux is not required for PV guest configuration, but for HVM
> +build_syslinux_cfg () {
> +	echo "ALLOWOPTIONS 1" > ${SYSLINUXCFG}
> +	echo "DEFAULT boot" >> ${SYSLINUXCFG}
> +	echo "TIMEOUT 10" >> ${SYSLINUXCFG}
> +	echo "PROMPT 1" >> ${SYSLINUXCFG}
> +	echo "LABEL boot" >> ${SYSLINUXCFG}
> +	echo "  KERNEL /vmlinuz" >> ${SYSLINUXCFG}
> +	echo "  INITRD /initrd" >> ${SYSLINUXCFG}
> +	echo "  APPEND ${SYSLINUX_KERNEL_ARGS}" >> ${SYSLINUXCFG}
> +}
> 



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

* Re: [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag.
  2013-10-06 21:22 [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Chris Patterson
                   ` (3 preceding siblings ...)
  2013-10-06 21:22 ` [PATCH] xen-image-minimal: break out arguments for xen and linux kernel as variables SYSLINUX_XEN_ARGS and SYSLINUX_KERNEL_ARGS to allow modification/overwriting Chris Patterson
@ 2013-10-07 17:22 ` Philip Tricca
  2013-10-08 11:57   ` Chris Patterson
  4 siblings, 1 reply; 10+ messages in thread
From: Philip Tricca @ 2013-10-07 17:22 UTC (permalink / raw)
  To: Chris Patterson; +Cc: meta-virtualization

I'm not the gate-keeper here so feel free to disagree but I'd like this more if it were broken up a bit. Thoughts on breaking guest support out into a PV guest and a PVHVM guest? The goal here would be to partition the kernel options that aren't modules (specifically PVHVM, DOM0, PVMMU, PRIVILEGED_GUEST etc).

No need to do all of this on the first past I suppose. It may be better to have someone propose a partitioning after this gets picked up.

Also: what's with having 'KVM_GUEST' compiled in? Is it a dependency?

Cheers,
- Philip

On 10/06/2013 05:22 PM, Chris Patterson wrote:
> Signed-off-by: Chris Patterson <cjp256@gmail.com>
> ---
>  recipes-kernel/linux/linux-yocto/xen-guest.cfg | 55 ++++++++++++++++++++++++++
>  recipes-kernel/linux/linux-yocto/xen-guest.scc |  4 ++
>  recipes-kernel/linux/linux-yocto_3.10.bbappend |  3 ++
>  recipes-kernel/linux/linux-yocto_3.4.bbappend  |  3 ++
>  recipes-kernel/linux/linux-yocto_3.8.bbappend  |  3 ++
>  5 files changed, 68 insertions(+)
>  create mode 100644 recipes-kernel/linux/linux-yocto/xen-guest.cfg
>  create mode 100644 recipes-kernel/linux/linux-yocto/xen-guest.scc
> 
> diff --git a/recipes-kernel/linux/linux-yocto/xen-guest.cfg b/recipes-kernel/linux/linux-yocto/xen-guest.cfg
> new file mode 100644
> index 0000000..cbde3cc
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-yocto/xen-guest.cfg
> @@ -0,0 +1,55 @@
> +###
> +# linux 3.4, 3.8
> +CONFIG_PARAVIRT_GUEST=y
> +###
> +
> +###
> +# linux 3.10
> +CONFIG_HYPERVISOR_GUEST=y
> +###
> +
> +CONFIG_PARAVIRT=y
> +CONFIG_XEN=y
> +CONFIG_XEN_DOM0=y
> +CONFIG_XEN_PRIVILEGED_GUEST=y
> +CONFIG_XEN_PVHVM=y
> +CONFIG_XEN_MAX_DOMAIN_MEMORY=500
> +CONFIG_XEN_SAVE_RESTORE=y
> +CONFIG_KVM_GUEST=y
> +CONFIG_PARAVIRT_CLOCK=y
> +CONFIG_HIBERNATE_CALLBACKS=y
> +CONFIG_PCI_XEN=y
> +CONFIG_XEN_PCIDEV_FRONTEND=m
> +CONFIG_SYS_HYPERVISOR=y
> +CONFIG_XEN_BLKDEV_FRONTEND=y
> +CONFIG_XEN_BLKDEV_BACKEND=m
> +CONFIG_XEN_NETDEV_FRONTEND=y
> +CONFIG_XEN_NETDEV_BACKEND=m
> +CONFIG_INPUT_MISC=y
> +CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
> +CONFIG_HVC_IRQ=y
> +CONFIG_HVC_XEN=y
> +CONFIG_HVC_XEN_FRONTEND=y
> +CONFIG_XEN_WDT=m
> +CONFIG_FB_SYS_FILLRECT=y
> +CONFIG_FB_SYS_COPYAREA=y
> +CONFIG_FB_SYS_IMAGEBLIT=y
> +CONFIG_FB_SYS_FOPS=y
> +CONFIG_FB_DEFERRED_IO=y
> +CONFIG_XEN_FBDEV_FRONTEND=y
> +CONFIG_XEN_BALLOON=y
> +CONFIG_XEN_SCRUB_PAGES=y
> +CONFIG_XEN_DEV_EVTCHN=y
> +CONFIG_XEN_BACKEND=y
> +CONFIG_XENFS=y
> +CONFIG_XEN_COMPAT_XENFS=y
> +CONFIG_XEN_SYS_HYPERVISOR=y
> +CONFIG_XEN_XENBUS_FRONTEND=y
> +CONFIG_XEN_GNTDEV=y
> +CONFIG_XEN_GRANT_DEV_ALLOC=y
> +CONFIG_SWIOTLB_XEN=y
> +CONFIG_XEN_PCIDEV_BACKEND=m
> +CONFIG_XEN_PRIVCMD=m
> +CONFIG_XEN_ACPI_PROCESSOR=m
> +CONFIG_XEN_MCE_LOG=y
> +CONFIG_XEN_HAVE_PVMMU=y
> diff --git a/recipes-kernel/linux/linux-yocto/xen-guest.scc b/recipes-kernel/linux/linux-yocto/xen-guest.scc
> new file mode 100644
> index 0000000..575bc43
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-yocto/xen-guest.scc
> @@ -0,0 +1,4 @@
> +define KFEATURE_DESCRIPTION "Xen PV Guest Support"
> +define KFEATURE_COMPATIBILITY board
> +
> +kconf non-hardware xen-guest.cfg
> diff --git a/recipes-kernel/linux/linux-yocto_3.10.bbappend b/recipes-kernel/linux/linux-yocto_3.10.bbappend
> index cc7fd98..a3165cd 100644
> --- a/recipes-kernel/linux/linux-yocto_3.10.bbappend
> +++ b/recipes-kernel/linux/linux-yocto_3.10.bbappend
> @@ -17,3 +17,6 @@ KERNEL_FEATURES_append += "${@base_contains('DISTRO_FEATURES', 'aufs', ' feature
>  
>  # xen dom0 kernel support
>  SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
> +
> +# xen guest kernel support
> +SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', ' file://xen-guest.scc', '', d)}"
> diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend
> index 448d57f..4d3a0d1 100644
> --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend
> +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend
> @@ -14,3 +14,6 @@ module_autoload_kvm-intel = "kvm-intel"
>  
>  # xen dom0 kernel support
>  SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
> +
> +# xen guest kernel support
> +SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', ' file://xen-guest.scc', '', d)}"
> diff --git a/recipes-kernel/linux/linux-yocto_3.8.bbappend b/recipes-kernel/linux/linux-yocto_3.8.bbappend
> index cc7fd98..a3165cd 100644
> --- a/recipes-kernel/linux/linux-yocto_3.8.bbappend
> +++ b/recipes-kernel/linux/linux-yocto_3.8.bbappend
> @@ -17,3 +17,6 @@ KERNEL_FEATURES_append += "${@base_contains('DISTRO_FEATURES', 'aufs', ' feature
>  
>  # xen dom0 kernel support
>  SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
> +
> +# xen guest kernel support
> +SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', ' file://xen-guest.scc', '', d)}"
> 



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

* Re: [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag.
  2013-10-07 17:22 ` [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Philip Tricca
@ 2013-10-08 11:57   ` Chris Patterson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Patterson @ 2013-10-08 11:57 UTC (permalink / raw)
  To: Philip Tricca; +Cc: meta-virtualization

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

Hey Phil,

On Mon, Oct 7, 2013 at 1:22 PM, Philip Tricca <flihp@twobit.us> wrote:

> I'm not the gate-keeper here so feel free to disagree but I'd like this
> more if it were broken up a bit. Thoughts on breaking guest support out
> into a PV guest and a PVHVM guest? The goal here would be to partition the
> kernel options that aren't modules (specifically PVHVM, DOM0, PVMMU,
> PRIVILEGED_GUEST etc).
>
>
This was meant more for a general case, rather than the ultra-minimalist.
It could certainly be broken up more.  But then, it's not entirely clear to
me where you draw the line.  It appears to me that many yocto kernel
configs/fragments tend to build in a significant amount of hardware device
support instead of requiring modules.

My thoughts were to make the backend bits as modules and build in the
common front ends (which is effectively virtual hardware support) and
basics (PVHVM, etc).  On that note, I set pcifront as a module in this
fragment, which should probably also be built in.

No need to do all of this on the first past I suppose. It may be better to
> have someone propose a partitioning after this gets picked up.
>
> Also: what's with having 'KVM_GUEST' compiled in? Is it a dependency?
>
>
I think it slipped into the dom0 config when I was testing nested in KVM.
And using that as my starting point, it slipped in again :)  It should be
able to be safely removed.

Have a good one,
-Chris

Cheers,
> - Philip
>
> On 10/06/2013 05:22 PM, Chris Patterson wrote:
> > Signed-off-by: Chris Patterson <cjp256@gmail.com>
> > ---
> >  recipes-kernel/linux/linux-yocto/xen-guest.cfg | 55
> ++++++++++++++++++++++++++
> >  recipes-kernel/linux/linux-yocto/xen-guest.scc |  4 ++
> >  recipes-kernel/linux/linux-yocto_3.10.bbappend |  3 ++
> >  recipes-kernel/linux/linux-yocto_3.4.bbappend  |  3 ++
> >  recipes-kernel/linux/linux-yocto_3.8.bbappend  |  3 ++
> >  5 files changed, 68 insertions(+)
> >  create mode 100644 recipes-kernel/linux/linux-yocto/xen-guest.cfg
> >  create mode 100644 recipes-kernel/linux/linux-yocto/xen-guest.scc
> >
> > diff --git a/recipes-kernel/linux/linux-yocto/xen-guest.cfg
> b/recipes-kernel/linux/linux-yocto/xen-guest.cfg
> > new file mode 100644
> > index 0000000..cbde3cc
> > --- /dev/null
> > +++ b/recipes-kernel/linux/linux-yocto/xen-guest.cfg
> > @@ -0,0 +1,55 @@
> > +###
> > +# linux 3.4, 3.8
> > +CONFIG_PARAVIRT_GUEST=y
> > +###
> > +
> > +###
> > +# linux 3.10
> > +CONFIG_HYPERVISOR_GUEST=y
> > +###
> > +
> > +CONFIG_PARAVIRT=y
> > +CONFIG_XEN=y
> > +CONFIG_XEN_DOM0=y
> > +CONFIG_XEN_PRIVILEGED_GUEST=y
> > +CONFIG_XEN_PVHVM=y
> > +CONFIG_XEN_MAX_DOMAIN_MEMORY=500
> > +CONFIG_XEN_SAVE_RESTORE=y
> > +CONFIG_KVM_GUEST=y
> > +CONFIG_PARAVIRT_CLOCK=y
> > +CONFIG_HIBERNATE_CALLBACKS=y
> > +CONFIG_PCI_XEN=y
> > +CONFIG_XEN_PCIDEV_FRONTEND=m
> > +CONFIG_SYS_HYPERVISOR=y
> > +CONFIG_XEN_BLKDEV_FRONTEND=y
> > +CONFIG_XEN_BLKDEV_BACKEND=m
> > +CONFIG_XEN_NETDEV_FRONTEND=y
> > +CONFIG_XEN_NETDEV_BACKEND=m
> > +CONFIG_INPUT_MISC=y
> > +CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
> > +CONFIG_HVC_IRQ=y
> > +CONFIG_HVC_XEN=y
> > +CONFIG_HVC_XEN_FRONTEND=y
> > +CONFIG_XEN_WDT=m
> > +CONFIG_FB_SYS_FILLRECT=y
> > +CONFIG_FB_SYS_COPYAREA=y
> > +CONFIG_FB_SYS_IMAGEBLIT=y
> > +CONFIG_FB_SYS_FOPS=y
> > +CONFIG_FB_DEFERRED_IO=y
> > +CONFIG_XEN_FBDEV_FRONTEND=y
> > +CONFIG_XEN_BALLOON=y
> > +CONFIG_XEN_SCRUB_PAGES=y
> > +CONFIG_XEN_DEV_EVTCHN=y
> > +CONFIG_XEN_BACKEND=y
> > +CONFIG_XENFS=y
> > +CONFIG_XEN_COMPAT_XENFS=y
> > +CONFIG_XEN_SYS_HYPERVISOR=y
> > +CONFIG_XEN_XENBUS_FRONTEND=y
> > +CONFIG_XEN_GNTDEV=y
> > +CONFIG_XEN_GRANT_DEV_ALLOC=y
> > +CONFIG_SWIOTLB_XEN=y
> > +CONFIG_XEN_PCIDEV_BACKEND=m
> > +CONFIG_XEN_PRIVCMD=m
> > +CONFIG_XEN_ACPI_PROCESSOR=m
> > +CONFIG_XEN_MCE_LOG=y
> > +CONFIG_XEN_HAVE_PVMMU=y
> > diff --git a/recipes-kernel/linux/linux-yocto/xen-guest.scc
> b/recipes-kernel/linux/linux-yocto/xen-guest.scc
> > new file mode 100644
> > index 0000000..575bc43
> > --- /dev/null
> > +++ b/recipes-kernel/linux/linux-yocto/xen-guest.scc
> > @@ -0,0 +1,4 @@
> > +define KFEATURE_DESCRIPTION "Xen PV Guest Support"
> > +define KFEATURE_COMPATIBILITY board
> > +
> > +kconf non-hardware xen-guest.cfg
> > diff --git a/recipes-kernel/linux/linux-yocto_3.10.bbappend
> b/recipes-kernel/linux/linux-yocto_3.10.bbappend
> > index cc7fd98..a3165cd 100644
> > --- a/recipes-kernel/linux/linux-yocto_3.10.bbappend
> > +++ b/recipes-kernel/linux/linux-yocto_3.10.bbappend
> > @@ -17,3 +17,6 @@ KERNEL_FEATURES_append +=
> "${@base_contains('DISTRO_FEATURES', 'aufs', ' feature
> >
> >  # xen dom0 kernel support
> >  SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', '
> file://xen.scc', '', d)}"
> > +
> > +# xen guest kernel support
> > +SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', '
> file://xen-guest.scc', '', d)}"
> > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend
> b/recipes-kernel/linux/linux-yocto_3.4.bbappend
> > index 448d57f..4d3a0d1 100644
> > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend
> > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend
> > @@ -14,3 +14,6 @@ module_autoload_kvm-intel = "kvm-intel"
> >
> >  # xen dom0 kernel support
> >  SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', '
> file://xen.scc', '', d)}"
> > +
> > +# xen guest kernel support
> > +SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', '
> file://xen-guest.scc', '', d)}"
> > diff --git a/recipes-kernel/linux/linux-yocto_3.8.bbappend
> b/recipes-kernel/linux/linux-yocto_3.8.bbappend
> > index cc7fd98..a3165cd 100644
> > --- a/recipes-kernel/linux/linux-yocto_3.8.bbappend
> > +++ b/recipes-kernel/linux/linux-yocto_3.8.bbappend
> > @@ -17,3 +17,6 @@ KERNEL_FEATURES_append +=
> "${@base_contains('DISTRO_FEATURES', 'aufs', ' feature
> >
> >  # xen dom0 kernel support
> >  SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', '
> file://xen.scc', '', d)}"
> > +
> > +# xen guest kernel support
> > +SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen-guest', '
> file://xen-guest.scc', '', d)}"
> >
>
>

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

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

* Re: [PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment.
  2013-10-07 17:21   ` Philip Tricca
@ 2013-10-08 12:09     ` Chris Patterson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Patterson @ 2013-10-08 12:09 UTC (permalink / raw)
  To: Philip Tricca; +Cc: meta-virtualization

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

On Mon, Oct 7, 2013 at 1:21 PM, Philip Tricca <flihp@twobit.us> wrote:

> I'm a bit confused about this one. Maybe it's my misunderstanding.
> Questions in line:
>
> On 10/06/2013 05:22 PM, Chris Patterson wrote:
> > Signed-off-by: Chris Patterson <cjp256@gmail.com>
> > ---
> >  recipes-extended/images/xen-guest-image-minimal.bb | 31
> ++++++++++++++++++++++
> >  1 file changed, 31 insertions(+)
> >  create mode 100644 recipes-extended/images/xen-guest-image-minimal.bb
> >
> > diff --git a/recipes-extended/images/xen-guest-image-minimal.bbb/recipes-extended/images/
> xen-guest-image-minimal.bb
> > new file mode 100644
> > index 0000000..05b0b61
> > --- /dev/null
> > +++ b/recipes-extended/images/xen-guest-image-minimal.bb
> > @@ -0,0 +1,31 @@
> > +DESCRIPTION = "A Xen PV guest image."
> > +
> > +inherit core-image
> > +
> > +IMAGE_INSTALL += " \
> > +    packagegroup-core-boot \
> > +    kernel-module-xen-acpi-processor \
> > +    kernel-module-xen-blkback \
> > +    kernel-module-xen-netback \
> > +    kernel-module-xen-pciback \
>
> For a minimal guest I'd expect you wouldn't want any of the *back drivers.
> Did you mean for these to be the *front drivers?
>
>
This image was matching up to the xen-guest kernel fragment, including the
remaining xen modules.  The backend modules are not required and could be
removed from this image.

Thanks,
-Chris


> Cheers,
> - Philip
>
> > +    kernel-module-xen-pcifront \
> > +    "
> > +
> > +IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', '
> xf86-video-fbdev', '', d)}"
> > +IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', '
> xf86-video-vesa', '', d)}"
> > +
> > +LICENSE = "MIT"
> > +
> > +SYSLINUX_KERNEL_ARGS ?= "LABEL=boot ramdisk_size=32768 root=/dev/ram0
> rootimg=rootfs.img rw console=hvc0 console=tty0 panic=10 debugshell=5"
> > +
> > +# syslinux is not required for PV guest configuration, but for HVM
> > +build_syslinux_cfg () {
> > +     echo "ALLOWOPTIONS 1" > ${SYSLINUXCFG}
> > +     echo "DEFAULT boot" >> ${SYSLINUXCFG}
> > +     echo "TIMEOUT 10" >> ${SYSLINUXCFG}
> > +     echo "PROMPT 1" >> ${SYSLINUXCFG}
> > +     echo "LABEL boot" >> ${SYSLINUXCFG}
> > +     echo "  KERNEL /vmlinuz" >> ${SYSLINUXCFG}
> > +     echo "  INITRD /initrd" >> ${SYSLINUXCFG}
> > +     echo "  APPEND ${SYSLINUX_KERNEL_ARGS}" >> ${SYSLINUXCFG}
> > +}
> >
>
>

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

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

end of thread, other threads:[~2013-10-08 12:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-06 21:22 [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Chris Patterson
2013-10-06 21:22 ` [PATCH] xen: add INSANE_SKIP flag 'already-stripped' to silence QA warnings about stripped qemu binaries Chris Patterson
2013-10-07 17:16   ` Philip Tricca
2013-10-06 21:22 ` [PATCH] xen: Add sdl support by including dependency for libsdl Chris Patterson
2013-10-06 21:22 ` [PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment Chris Patterson
2013-10-07 17:21   ` Philip Tricca
2013-10-08 12:09     ` Chris Patterson
2013-10-06 21:22 ` [PATCH] xen-image-minimal: break out arguments for xen and linux kernel as variables SYSLINUX_XEN_ARGS and SYSLINUX_KERNEL_ARGS to allow modification/overwriting Chris Patterson
2013-10-07 17:22 ` [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag Philip Tricca
2013-10-08 11:57   ` Chris Patterson

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.