From 465f52982989aa2927e69c088390a1f07d7940d4 Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Fri, 15 May 2020 10:56:31 -0500 Subject: check the THP disabled --- launch-qemu.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/launch-qemu.sh b/launch-qemu.sh index b396af2..db13e7f 100755 --- a/launch-qemu.sh +++ b/launch-qemu.sh @@ -225,6 +225,14 @@ if [ ${SEV} = "1" ]; then if [ "${SEV_SNP}" = 1 ]; then SEV_GUEST_SNP=",snp=yes" + + # check if THP is disable + cat /sys/kernel/mm/transparent_hugepage/enabled | grep -w "\[never\]" + if [ $? -ne 0 ]; then + echo "ERROR: THP is enabled, run the following command to disable it and retry" + echo "echo never > /sys/kernel/mm/transparent_hugepage/enabled" + exit 1 + fi fi get_cbitpos -- cgit v1.2.3-71-gd317