Skip to content

Commit

Permalink
package: enable cloud-hypervisor for arm64
Browse files Browse the repository at this point in the history
Now, cloud-hypervisor is capable to work on arm64. it's time to
enable it in kata for arm64.
as cloud-hypervisor can only use virtio-fs, a new patch should be
applied to kernel for virtiofs and some config should be removed
temporarily.

Fixes: #446
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
  • Loading branch information
jongwu committed Jul 24, 2020
1 parent c5c3f5c commit c072017
Show file tree
Hide file tree
Showing 6 changed files with 530 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tools/packaging/kernel/build-kernel.sh
Expand Up @@ -29,8 +29,8 @@ download_kernel=false
# The repository where kernel configuration lives
runtime_repository="github.com/${project_name}/runtime"
# The repository where kernel configuration lives
readonly kernel_config_repo="github.com/${project_name}/packaging"
readonly patches_repo="github.com/${project_name}/packaging"
readonly kernel_config_repo="github.com/${project_name}/kata-containers/tools/packaging"
readonly patches_repo="github.com/${project_name}/kata-containers/tools/packaging"
readonly patches_repo_dir="${GOPATH}/src/${patches_repo}"
# Default path to search patches to apply to kernel
readonly default_patches_dir="${patches_repo_dir}/kernel/patches/"
Expand Down Expand Up @@ -391,7 +391,7 @@ build_kernel() {
make -j $(nproc) ARCH="${arch_target}"
[ "$arch_target" != "powerpc" ] && ([ -e "arch/${arch_target}/boot/bzImage" ] || [ -e "arch/${arch_target}/boot/Image.gz" ])
[ -e "vmlinux" ]
[ "${hypervisor_target}" == "firecracker" ] && [ "${arch_target}" == "arm64" ] && [ -e "arch/${arch_target}/boot/Image" ]
([ "${hypervisor_target}" == "firecracker" ] || [ "${hypervisor_target}" == "cloud-hypervisor" ]) && [ "${arch_target}" == "arm64" ] && [ -e "arch/${arch_target}/boot/Image" ]
popd >>/dev/null
}

Expand Down
3 changes: 2 additions & 1 deletion tools/packaging/kernel/configs/fragments/arm64/base.conf
Expand Up @@ -22,7 +22,8 @@ CONFIG_PERF_EVENTS=y
CONFIG_ARM64_PSEUDO_NMI=y
CONFIG_ARM64_SVE=y

# Arm64 prefers to use REFCOUNT_FULL by default.
# Arm64 prefers to use REFCOUNT_FULL by default, disable it as the
# latest kernel has discarded it, add it to whitelist.
CONFIG_REFCOUNT_FULL=y

#
Expand Down
9 changes: 7 additions & 2 deletions tools/packaging/kernel/configs/fragments/arm64/ptp.conf
Expand Up @@ -3,5 +3,10 @@
# The implementation of ptp_kvm on arm is one experimental feature,
# you need to apply private patches to enable it on your host machine.
# See https://github.com/kata-containers/packaging/pull/998 for detailed info.
CONFIG_PTP_1588_CLOCK=y
CONFIG_PTP_1588_CLOCK_KVM=y
#
# as ptp_kvm is under review in upstream and linux kernel in virtio-fs branch
# will change with time, we need update the patch again and again. For now, we
# disable ptp_kvm to wait for the stable kernel version of virtio-fs or ptp_kvm
# accept by upstream.
#CONFIG_PTP_1588_CLOCK=y
#CONFIG_PTP_1588_CLOCK_KVM=y
1 change: 1 addition & 0 deletions tools/packaging/kernel/configs/fragments/whitelist.conf
Expand Up @@ -6,3 +6,4 @@ CONFIG_NF_NAT_PROTO_DCCP
CONFIG_NF_NAT_PROTO_GRE
CONFIG_NF_NAT_PROTO_SCTP
CONFIG_NF_NAT_PROTO_UDPLITE
CONFIG_REFCOUNT_FULL
2 changes: 1 addition & 1 deletion tools/packaging/kernel/kata_config_version
@@ -1 +1 @@
80
81

0 comments on commit c072017

Please sign in to comment.