aboutsummaryrefslogtreecommitdiffstats
path: root/launch-qemu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'launch-qemu.sh')
-rwxr-xr-xlaunch-qemu.sh8
1 files changed, 8 insertions, 0 deletions
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