Skip to contentSkip to conversation

Xen guest support

PATCH In review Chris Patterson 2 participants 6 messages Oct 10, 2013 – Oct 11, 2013

lore
Share & tools
lore
#0 lore raw

v2 cover Xen guest support

This patch set supercedes:
[meta-virtualization][PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment. [meta-virtualization][PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag.

v1 -> v2:
Consolidates xen-guest.cfg and xen.cfg into a single fragment that should be more consistent with typical yocto fragments and satisfies requirements for different types of xen guests. Simplified xen-guest-image-minimal to simply append console=hvc0 kernel argument instead of the special syslinux config handling.

Chris Patterson (3):
linux-yocto/xen: update fragment to support both dom0 and typical xen
guests.
xen-image-minimal: update image installed modules to reflect xen
fragment changes.
xen-guest-image-minimal: add minimal xen guest image.

 recipes-extended/images/xen-guest-image-minimal.bb | 16 ++++++++++++++++
 recipes-extended/images/xen-image-minimal.bb       |  6 ------
 recipes-kernel/linux/linux-yocto/xen.cfg           | 13 ++++++-------
 recipes-kernel/linux/linux-yocto/xen.scc           |  4 ++--
 recipes-kernel/linux/linux-yocto_3.10.bbappend     |  2 +-
 recipes-kernel/linux/linux-yocto_3.4.bbappend      |  2 +-
 recipes-kernel/linux/linux-yocto_3.8.bbappend      |  2 +-
 7 files changed, 27 insertions(+), 18 deletions(-)
 create mode 100644 recipes-extended/images/xen-guest-image-minimal.bb
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH v2 1/3 linux-yocto/xen: update fragment to support both dom0 and typical xen guests.

Updated linux kernel fragment to match defaults as defined in the 3.10 kernel's Kconfig files. If defaults were not specified, modules were were used unless required by another built-in option. As such, The core frontend drivers are included by default and the backend drivers are built as modules.

This allows privileged, PV, HVM, and PVHVM guests to work properly without additional kernel configuration or modules required in initramfs (from a Xen support perspective).

This also removes CONFIG_KVM_GUEST which was erroneously included previously.

---
 recipes-kernel/linux/linux-yocto/xen.cfg       | 13 ++++++-------
 recipes-kernel/linux/linux-yocto/xen.scc       |  4 ++--
 recipes-kernel/linux/linux-yocto_3.10.bbappend |  2 +-
 recipes-kernel/linux/linux-yocto_3.4.bbappend  |  2 +-
 recipes-kernel/linux/linux-yocto_3.8.bbappend  |  2 +-
 5 files changed, 11 insertions(+), 12 deletions(-)
recipes-kernel/linux/linux-yocto/xen.cfg +6 -7
index e7d774e..4e796b9 100644
@@ -15,15 +15,14 @@ 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_XEN_PCIDEV_FRONTEND=y
 CONFIG_SYS_HYPERVISOR=y
-CONFIG_XEN_BLKDEV_FRONTEND=m
+CONFIG_XEN_BLKDEV_FRONTEND=y
 CONFIG_XEN_BLKDEV_BACKEND=m
-CONFIG_XEN_NETDEV_FRONTEND=m
+CONFIG_XEN_NETDEV_FRONTEND=y
 CONFIG_XEN_NETDEV_BACKEND=m
 CONFIG_INPUT_MISC=y
 CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
@@ -39,9 +38,9 @@ CONFIG_FB_DEFERRED_IO=y
 CONFIG_XEN_FBDEV_FRONTEND=y
 CONFIG_XEN_BALLOON=y
 CONFIG_XEN_SCRUB_PAGES=y
-CONFIG_XEN_DEV_EVTCHN=m
+CONFIG_XEN_DEV_EVTCHN=y
 CONFIG_XEN_BACKEND=y
-CONFIG_XENFS=m
+CONFIG_XENFS=y
 CONFIG_XEN_COMPAT_XENFS=y
 CONFIG_XEN_SYS_HYPERVISOR=y
 CONFIG_XEN_XENBUS_FRONTEND=y
@@ -49,7 +48,7 @@ CONFIG_XEN_GNTDEV=m
 CONFIG_XEN_GRANT_DEV_ALLOC=m
 CONFIG_SWIOTLB_XEN=y
 CONFIG_XEN_PCIDEV_BACKEND=m
-CONFIG_XEN_PRIVCMD=m
+CONFIG_XEN_PRIVCMD=y
 CONFIG_XEN_ACPI_PROCESSOR=m
 CONFIG_XEN_MCE_LOG=y
 CONFIG_XEN_HAVE_PVMMU=y
recipes-kernel/linux/linux-yocto/xen.scc +2 -2
index 6c68bda..b588e5d 100644
@@ -1,4 +1,4 @@
-define KFEATURE_DESCRIPTION "Xen Dom0 Support"
-define KFEATURE_COMPATIBILITY board
+define KFEATURE_DESCRIPTION "Xen Kernel Support"
+define KFEATURE_COMPATIBILITY arch
 
 kconf non-hardware xen.cfg
recipes-kernel/linux/linux-yocto_3.10.bbappend +1 -1
index cc7fd98..c029c05 100644
@@ -15,5 +15,5 @@ module_autoload_kvm-intel = "kvm-intel"
 # aufs kernel support required for xen-image-minimal
 KERNEL_FEATURES_append += "${@base_contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
 
-# xen dom0 kernel support
+# xen kernel support
 SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
recipes-kernel/linux/linux-yocto_3.4.bbappend +1 -1
index 448d57f..bf84725 100644
@@ -12,5 +12,5 @@ module_autoload_kvm = "kvm"
 module_autoload_kvm-amd = "kvm-amd"
 module_autoload_kvm-intel = "kvm-intel"
 
-# xen dom0 kernel support
+# xen kernel support
 SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
recipes-kernel/linux/linux-yocto_3.8.bbappend +1 -1
index cc7fd98..c029c05 100644
@@ -15,5 +15,5 @@ module_autoload_kvm-intel = "kvm-intel"
 # aufs kernel support required for xen-image-minimal
 KERNEL_FEATURES_append += "${@base_contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
 
-# xen dom0 kernel support
+# xen kernel support
 SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
Signature · 1 line
1.8.4.rc3
#2 lore raw

PATCH v2 2/3 xen-image-minimal: update image installed modules to reflect xen fragment changes.

In reply to Chris Patterson
---
 recipes-extended/images/xen-image-minimal.bb | 6 ------
 1 file changed, 6 deletions(-)
recipes-extended/images/xen-image-minimal.bb +0 -6
index c582f57..00146f7 100644
@@ -7,16 +7,10 @@ IMAGE_INSTALL += " \
     packagegroup-core-ssh-openssh \
     kernel-module-xen-acpi-processor \
     kernel-module-xen-blkback \
-    kernel-module-xen-blkfront \
-    kernel-module-xen-evtchn \
-    kernel-module-xenfs \
     kernel-module-xen-gntalloc \
     kernel-module-xen-gntdev \
     kernel-module-xen-netback \
-    kernel-module-xen-netfront \
     kernel-module-xen-pciback \
-    kernel-module-xen-pcifront \
-    kernel-module-xen-privcmd \
     kernel-module-xen-wdt \
     xen-base \
     xen-qemu \
Signature · 1 line
1.8.4.rc3
#3 lore raw

PATCH v2 3/3 xen-guest-image-minimal: add minimal xen guest image.

In reply to Chris Patterson
---
 recipes-extended/images/xen-guest-image-minimal.bb | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 recipes-extended/images/xen-guest-image-minimal.bb
recipes-extended/images/xen-guest-image-minimal.bb new file +16 -0
new file mode 100644
index 0000000..bcac4d7
@@ -0,0 +1,16 @@
+DESCRIPTION = "A Xen guest image."
+
+inherit core-image
+
+IMAGE_INSTALL += " \
+    packagegroup-core-boot \
+    kernel-module-xen-acpi-processor \
+    "
+
+IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', ' xf86-video-fbdev', '', d)}"
+IMAGE_INSTALL += "${@base_contains('DISTRO_FEATURES', 'x11', ' xf86-video-vesa', '', d)}"
+
+LICENSE = "MIT"
+
+# Send console messages to xen console
+APPEND += "console=hvc0"
Signature · 1 line
1.8.4.rc3
#4 lore raw
In reply to Chris Patterson
Quoted 7 lines · Chris Patterson

This patch set supercedes:
[meta-virtualization][PATCH] xen-guest-image-minimal: example image for a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment. [meta-virtualization][PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag.

v1 -> v2:
Consolidates xen-guest.cfg and xen.cfg into a single fragment that should be more consistent with typical yocto fragments and satisfies requirements for different types of xen guests. Simplified xen-guest-image-minimal to simply append console=hvc0 kernel argument instead of the special syslinux config handling.

Chris,

I grabbed and merged these three, plus the outstanding patches from your other series. I very well could have missed something, so if i have, resend them and I'll get them merged right away.

Bruce

Quoted 25 lines

Chris Patterson (3):
linux-yocto/xen: update fragment to support both dom0 and typical xen
guests.
xen-image-minimal: update image installed modules to reflect xen
fragment changes.
xen-guest-image-minimal: add minimal xen guest image.

 recipes-extended/images/xen-guest-image-minimal.bb | 16 ++++++++++++++++
 recipes-extended/images/xen-image-minimal.bb       |  6 ------
 recipes-kernel/linux/linux-yocto/xen.cfg           | 13 ++++++-------
 recipes-kernel/linux/linux-yocto/xen.scc           |  4 ++--
 recipes-kernel/linux/linux-yocto_3.10.bbappend     |  2 +-
 recipes-kernel/linux/linux-yocto_3.4.bbappend      |  2 +-
 recipes-kernel/linux/linux-yocto_3.8.bbappend      |  2 +-
 7 files changed, 27 insertions(+), 18 deletions(-)
 create mode 100644 recipes-extended/images/xen-guest-image-minimal.bb

--
1.8.4.rc3

_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#5 lore raw

Thanks, looks good.

Quoted 55 lines · Bruce Ashfield
Quoted 2 lines · Chris Patterson

This patch set supercedes:
[meta-virtualization][PATCH] xen-guest-image-minimal: example image for

a PV/HVM/PVHVM xen guest built with the 'xen-guest' kernel fragment.

Quoted 1 line

[meta-virtualization][PATCH] linux-yocto: Add xen guest kernel fragment

support for PV/HVM guests, using 'xen-guest' distro flag.

Quoted 3 lines

v1 -> v2:
Consolidates xen-guest.cfg and xen.cfg into a single fragment that

should be more consistent with typical yocto fragments and satisfies requirements for different types of xen guests.

Quoted 1 line

Simplified xen-guest-image-minimal to simply append console=hvc0 kernel

argument instead of the special syslinux config handling.

Chris,

I grabbed and merged these three, plus the outstanding patches from your other series. I very well could have missed something, so if i have, resend them and I'll get them merged right away.

Bruce

Quoted 9 lines

Chris Patterson (3):
linux-yocto/xen: update fragment to support both dom0 and typical xen
guests.
xen-image-minimal: update image installed modules to reflect xen
fragment changes.
xen-guest-image-minimal: add minimal xen guest image.

 recipes-extended/images/xen-guest-image-minimal.bb | 16

++++++++++++++++

Quoted 9 lines
 recipes-extended/images/xen-image-minimal.bb       |  6 ------
 recipes-kernel/linux/linux-yocto/xen.cfg           | 13 ++++++-------
 recipes-kernel/linux/linux-yocto/xen.scc           |  4 ++--
 recipes-kernel/linux/linux-yocto_3.10.bbappend     |  2 +-
 recipes-kernel/linux/linux-yocto_3.4.bbappend      |  2 +-
 recipes-kernel/linux/linux-yocto_3.8.bbappend      |  2 +-
 7 files changed, 27 insertions(+), 18 deletions(-)
 create mode 100644 recipes-extended/images/xen-guest-image-minimal.bb
Quoted 7 lines

--
1.8.4.rc3

_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"