aboutsummaryrefslogtreecommitdiffstats
path: root/launch-qemu.sh
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2020-05-15 10:56:31 -0500
committerBrijesh Singh <brijesh.singh@amd.com>2020-05-15 10:56:31 -0500
commit465f52982989aa2927e69c088390a1f07d7940d4 (patch)
treedc86b4f77e4586c81d6ac8edca73b7936afa3be1 /launch-qemu.sh
parent2b47fe6f961044f41a6427ea65ab2ce8da0115e9 (diff)
downloadcachepc-amdsev-465f52982989aa2927e69c088390a1f07d7940d4.tar.gz
cachepc-amdsev-465f52982989aa2927e69c088390a1f07d7940d4.zip
check the THP disabled
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