Files
kata-containers/kernel/configs
Eric Ernst 8e43d9cac1 config: remove unneeded options, annotate what changes in future
common/DAX:
 - ARCH_ENABLE_MEMORY_HOTPLUG: not needed (auto-selected)
 - ARCH_HAS_ZONE_DEVICE: already automatically selected. This is
also removed in future kernels, so let's go ahead and drop.
 - RADIX_TREE_MULTIORDER: already autoselected, and dropped in future
kernels

common/net:
 - NF_NAT_NEEDED, NF_NAT_PROTO_*: these don't exist in newer kernels, as
they are refactored and unecessary in the upstream kernel. Keep them for
now, but consider dropping if we move to newer LTS. These are part of
whitelist of options we expect to be dropped with newer kernels in our
fragment building.
 - NF_NAT_MASQUERADE_IPV4: this is a select, not a tristate. Also, in
the future much of the ipv4/ipv6 nat code is combined, so this config
will not exist in newer kernels. Dropped.
 - INET6_XFRM_MODE_* are not needed on newer kernels. While I'm not
confident they are needed today for Kata, we will just note them and add
to whitelist for options we expect to be dropped with newer kernels in
our fragment building.
 - MAY_USE_DEVLINK: removed in future kernels, and should not be needed
anyway. Dropped.

x86_64/DAX:
 - ARCH_HAS_HMM: should not be needed, and is dropped in future kernels.
Dropped

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-09-06 15:43:49 -07:00
..
2019-07-25 18:13:03 +00:00

Kata Containers kernel config files

This directory contains Linux Kernel config files used to configure Kata Containers VM kernels.

Types of config files

This directory holds config files for the Kata Linux Kernel in two forms:

  • A tree of config file 'fragments' in the fragments sub-folder, that are constructed into a complete config file using the kernel scripts/kconfig/merge_config.sh script.
  • As complete config files that can be used as-is.

Kernel config fragments are the preferred method of constructing .config files to build Kata Containers kernels, due to their improved clarity and ease of maintenance over single file monolithic .configs.

How to use config files

The recommended way to set up a kernel tree, populate it with a relevant .config file, and build a kernel, is to use the build_kernel.sh script. For example:

$ ./build-kernel.sh setup

The build-kernel.sh script understands both full and fragment based config files.

Run ./build-kernel.sh help for more information.

How to modify config files

Complete config files can be modified either with an editor, or preferably using the kernel Kconfig configuration tools, for example:

$ cp x86_kata_kvm_4.14.x linux-4.14.22/.config
$ pushd linux-4.14.22
$ make menuconfig
$ popd
$ cp linux-4.14.22/.config x86_kata_kvm_4.14.x

Kernel fragments are best constructed using an editor. Tools such as grep and diff can help find the differences between two config files to be placed into a fragment.

If adding config entries for a new subsystem or feature, consider making a new fragment with an appropriately descriptive name.

The fragment gathering tool perfoms some basic sanity checks, and the build-kernel.sh will fail and report the error in the cases of:

  • A duplicate CONFIG symbol appearing.
  • A CONFIG symbol being in a fragment, but not appearing in the final .config
    • which indicates that CONFIG variable is not a part of the kernel Kconfig setup, which can indicate a typing mistake in the name of the symbol.
  • A CONFIG symbol appearing in the fragments with multiple different values.