Squashed 'import-layers/meta-virtualization/' content from commit c4a1711

Change-Id: I42132e4f0aef12ec265e74d95f489a6409e22f46
git-subtree-dir: import-layers/meta-virtualization
git-subtree-split: c4a1711dd31659b027c70c07e4ef6da98591ac95
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.cfg b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.cfg
new file mode 100644
index 0000000..a3c514e
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.cfg
@@ -0,0 +1,2 @@
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_T_NAT=m
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc
new file mode 100644
index 0000000..b3895e5
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable ebtables support"
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware ebtables.cfg
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.cfg b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.cfg
new file mode 100644
index 0000000..035b314
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.cfg
@@ -0,0 +1,21 @@
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CPUSETS=y
+CONFIG_PROC_PID_CPUSET=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_MEM_RES_CTLR=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_RT_GROUP_SCHED=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_IPC_NS=y
+CONFIG_USER_NS=y
+CONFIG_PID_NS=y
+CONFIG_NET_NS=y
+
+CONFIG_CLS_CGROUP=m
+CONFIG_BLK_CGROUP=m
+CONFIG_NETPRIO_CGROUP=m
+
+CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc
new file mode 100644
index 0000000..ee51883
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable Features needed by LxC, namespaces, cgroups et.c."
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware lxc.cfg
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.cfg b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.cfg
new file mode 100644
index 0000000..0067504
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.cfg
@@ -0,0 +1,2 @@
+CONFIG_OPENVSWITCH=m
+CONFIG_NET_SCH_INGRESS=m
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc
new file mode 100644
index 0000000..2790b4f
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable in kernel OpenvSwitch module"
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware vswitch.cfg
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.cfg b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.cfg
new file mode 100644
index 0000000..4780311
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.cfg
@@ -0,0 +1,50 @@
+CONFIG_HYPERVISOR_GUEST=y
+CONFIG_PARAVIRT=y
+CONFIG_XEN=y
+CONFIG_XEN_DOM0=y
+CONFIG_XEN_PVHVM=y
+CONFIG_XEN_MAX_DOMAIN_MEMORY=500
+CONFIG_XEN_SAVE_RESTORE=y
+# CONFIG_XEN_DEBUG_FS is not set
+CONFIG_XEN_PVH=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_PCI_XEN=y
+CONFIG_XEN_PCIDEV_FRONTEND=y
+CONFIG_SYS_HYPERVISOR=y
+CONFIG_XEN_BLKDEV_FRONTEND=y
+CONFIG_XEN_BLKDEV_BACKEND=m
+CONFIG_XEN_SCSI_FRONTEND=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=m
+CONFIG_XEN_GRANT_DEV_ALLOC=m
+CONFIG_SWIOTLB_XEN=y
+CONFIG_XEN_PCIDEV_BACKEND=m
+CONFIG_XEN_PRIVCMD=y
+CONFIG_XEN_ACPI_PROCESSOR=m
+CONFIG_XEN_MCE_LOG=y
+CONFIG_XEN_HAVE_PVMMU=y
+CONFIG_XEN_EFI=y
+CONFIG_XEN_AUTO_XLATE=y
+CONFIG_XEN_ACPI=y
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc
new file mode 100644
index 0000000..b588e5d
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Xen Kernel Support"
+define KFEATURE_COMPATIBILITY arch
+
+kconf non-hardware xen.cfg
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.cfg b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.cfg
new file mode 100644
index 0000000..58afbff
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.cfg
@@ -0,0 +1 @@
+CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc
new file mode 100644
index 0000000..d3804f0
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Add extra iptables modules"
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware xt-checksum.cfg
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.1.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.1.bbappend
new file mode 100644
index 0000000..85e98cc
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.1.bbappend
@@ -0,0 +1,19 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://xt-checksum.scc \
+            file://ebtables.scc \
+	    file://vswitch.scc \
+	    file://lxc.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 += "${@base_contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
+
+# xen kernel support
+SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..85e98cc
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,19 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://xt-checksum.scc \
+            file://ebtables.scc \
+	    file://vswitch.scc \
+	    file://lxc.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 += "${@base_contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
+
+# xen kernel support
+SRC_URI += "${@base_contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"