On Mon, Sep 25, 2017 at 8:31 PM, Chen Qi <[email protected]> wrote: > Make these bbappend files to take effect only when DISTRO_FEATURES > contain 'virtualization'. Otherwise, we would meet failure failure > at system booting up qemux86. Related logs are as below. > > systemd-modules-load[113]: Failed to insert 'kvm_amd': Operation not > supported > systemd-modules-load[113]: Failed to insert 'kvm_intel': Operation not > supported > > Signed-off-by: Chen Qi <[email protected]> ... > diff --git a/recipes-kernel/linux/linux-yocto_virtualization.inc > b/recipes-kernel/linux/linux-yocto_virtualization.inc > new file mode 100644 > index 0000000..8b296d7 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto_virtualization.inc > @@ -0,0 +1,20 @@ > +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:" > + > +SRC_URI += "file://xt-checksum.scc \ > + file://ebtables.scc \ > + file://vswitch.scc \ > + file://lxc.scc \ > + file://docker.scc \ > + " > +KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc" > + > +KERNEL_MODULE_AUTOLOAD += "openvswitch" > +KERNEL_MODULE_AUTOLOAD += "kvm" > +KERNEL_MODULE_AUTOLOAD += "kvm-amd" > +KERNEL_MODULE_AUTOLOAD += "kvm-intel" > + > +# aufs kernel support required for xen-image-minimal > +KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' > features/aufs/aufs-enable.scc', '', d)}" > + > +# xen kernel support > +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' > file://xen.scc', '', d)}" > -- > 2.11.0 > > --
Suggestion for a preferred change: make the KVM features depend on DISTRO_FEATURES containing 'kvm', in the same way that the Xen features do for DISTRO_FEATURES containing 'xen'. Here's why: those KVM kernel modules are not of interest on Xen systems. With this change, you're removing the KVM features from the qemu build to solve your bug in hand, by making it conditional on 'virtualization', but is still leaves them present when only Xen is needed. With that change, I'm not sure whether a 'virtualization' disto feature is immediately useful. It could make sense for features that are hypervisor-agnostic but I don't have an immediate example to point to. Christopher -- _______________________________________________ meta-virtualization mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-virtualization
