[meta-virtualization] [PATCH] linux-yocto: Add xen guest kernel fragment support for PV/HVM guests, using 'xen-guest' distro flag.

Chris Patterson cjp256 at gmail.com
Tue Oct 8 04:57:52 PDT 2013


Hey Phil,

On Mon, Oct 7, 2013 at 1:22 PM, Philip Tricca <flihp at 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 at 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)}"
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-virtualization/attachments/20131008/b8834511/attachment.html>


More information about the meta-virtualization mailing list