From fb6765973f5d8638aa4629dd12e6168e4149c4a5 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Wed, 29 Apr 2020 16:04:09 +0000 Subject: [PATCH] kernel: boot directly into the uncompressed kernel QEMU >= 4.0 is able to boot into the uncompressed kernel using the PVH entry point, but to get this `CONFIG_PVH` must be enabled in the guest kernel and `pvh.bin` installed in the host. Booting uncompressed kernels in QEMU 5.0 can reduce the memory footprint, ~17% for KSM and ~15% nonKSM. fixes #1029 Signed-off-by: Julio Montes --- kernel/configs/fragments/x86_64/base.conf | 4 ++++ kernel/kata_config_version | 2 +- static-build/qemu.blacklist | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/configs/fragments/x86_64/base.conf b/kernel/configs/fragments/x86_64/base.conf index a7969c751..9b9cb94a3 100644 --- a/kernel/configs/fragments/x86_64/base.conf +++ b/kernel/configs/fragments/x86_64/base.conf @@ -14,3 +14,7 @@ CONFIG_NR_CPUS=240 # For security CONFIG_LEGACY_VSYSCALL_NONE=y CONFIG_RETPOLINE=y + +# Boot directly into the uncompressed kernel +# Reduce memory footprint +CONFIG_PVH=y diff --git a/kernel/kata_config_version b/kernel/kata_config_version index 78eb67cee..dd475631b 100644 --- a/kernel/kata_config_version +++ b/kernel/kata_config_version @@ -1 +1 @@ -75 +76 diff --git a/static-build/qemu.blacklist b/static-build/qemu.blacklist index 0ac9daecb..7d18a641e 100644 --- a/static-build/qemu.blacklist +++ b/static-build/qemu.blacklist @@ -24,7 +24,6 @@ qemu_black_list=( */share/*/openbios-sparc64 */share/*/palcode-clipper */share/*/ppc_rom.bin -*/share/*/pvh.bin */share/*/pxe-* */share/*/QEMU,* */share/*/qemu_vga.ndrv