Skip to content

Commit

Permalink
Merge pull request #14 from balena-io-experimental/kyle/enable-guest-kvm
Browse files Browse the repository at this point in the history
Enable KVM in x86_64 guest kernels
flowzone-app[bot] authored Dec 12, 2023
2 parents 3603477 + fae4507 commit d868086
Showing 3 changed files with 43 additions and 6 deletions.
10 changes: 10 additions & 0 deletions test/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -51,6 +51,16 @@ if command -v ip >/dev/null 2>&1; then
ip route
fi

# nested virtualization is not available on aarch64
if [ -r /dev/kvm ]; then
ls -l /dev/kvm
test -w /dev/kvm

if which kvm-ok >/dev/null; then
kvm-ok
fi
fi

if command -v npm >/dev/null 2>&1; then
npm ping
fi
4 changes: 2 additions & 2 deletions test/setup.sh
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ ubuntu | debian)

# install packages required by healthchecks
apt-get update
apt-get install -y ca-certificates curl gnupg iproute2 iptables iputils-ping util-linux
apt-get install -y ca-certificates cpu-checker curl gnupg iproute2 iptables iputils-ping kmod util-linux

# Add Docker's official GPG key
install -m 0755 -d /etc/apt/keyrings
@@ -53,7 +53,7 @@ ubuntu | debian)
;;
alpine)
# install packages required by healthchecks
apk add --no-cache bash ca-certificates curl docker iproute2 iputils-ping lsblk util-linux
apk add --no-cache bash ca-certificates curl docker iproute2 iputils-ping kmod lsblk util-linux

# create nonroot user for healthchecks
adduser --disabled-password --gecos "" nonroot
35 changes: 31 additions & 4 deletions vmlinux/microvm-kernel-x86_64-5.10.config
Original file line number Diff line number Diff line change
@@ -2,14 +2,16 @@
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.10.0 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-13)"
CONFIG_CC_VERSION_TEXT="gcc (Debian 10.2.1-6) 10.2.1 20210110"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=70301
CONFIG_LD_VERSION=229010000
CONFIG_GCC_VERSION=100201
CONFIG_LD_VERSION=235020000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y
@@ -579,10 +581,28 @@ CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# end of Firmware Drivers

CONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not set
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQFD=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_HAVE_KVM_MSI=y
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
CONFIG_KVM_VFIO=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_COMPAT=y
CONFIG_HAVE_KVM_IRQ_BYPASS=y
CONFIG_HAVE_KVM_NO_POLL=y
CONFIG_KVM_XFER_TO_GUEST_WORK=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KVM_INTEL=y
CONFIG_KVM_AMD=y
CONFIG_AS_AVX512=y
CONFIG_AS_SHA1_NI=y
CONFIG_AS_SHA256_NI=y
CONFIG_AS_TPAUSE=y

#
# General architecture-dependent options
@@ -602,6 +622,7 @@ CONFIG_OPTPROBES=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_KRETPROBES=y
CONFIG_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
@@ -772,6 +793,7 @@ CONFIG_BLK_PM=y
# CONFIG_IOSCHED_BFQ is not set
# end of IO Schedulers

CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_ASN1=y
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
CONFIG_INLINE_READ_UNLOCK=y
@@ -831,6 +853,7 @@ CONFIG_CONTIG_ALLOC=y
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_TRANSPARENT_HUGEPAGE=y
@@ -1906,6 +1929,7 @@ CONFIG_AUXDISPLAY=y
# CONFIG_CHARLCD_BL_ON is not set
CONFIG_CHARLCD_BL_FLASH=y
# CONFIG_UIO is not set
CONFIG_IRQ_BYPASS_MANAGER=y
CONFIG_VIRT_DRIVERS=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_MENU=y
@@ -2650,6 +2674,7 @@ CONFIG_DECOMPRESS_LZO=y
CONFIG_DECOMPRESS_LZ4=y
CONFIG_DECOMPRESS_ZSTD=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_INTERVAL_TREE=y
CONFIG_XARRAY_MULTI=y
CONFIG_ASSOCIATIVE_ARRAY=y
CONFIG_HAS_IOMEM=y
@@ -2767,6 +2792,8 @@ CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
# CONFIG_KASAN is not set
# end of Memory Debugging

# CONFIG_DEBUG_SHIRQ is not set

0 comments on commit d868086

Please sign in to comment.