From cd68fbefd9c9470539cf5656074906b3baeca63c Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Sun, 24 May 2020 07:14:11 -0500 Subject: fix SEV policy calculation and remove thp change from grub --- launch-qemu.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'launch-qemu.sh') diff --git a/launch-qemu.sh b/launch-qemu.sh index db13e7f..43cec9b 100755 --- a/launch-qemu.sh +++ b/launch-qemu.sh @@ -220,12 +220,15 @@ if [ ${SEV} = "1" ]; then [ "${ALLOW_DEBUG}" = "1" ] && POLICY=$((POLICY & ~0x01)) [ "${SEV_ES}" = "1" ] && POLICY=$((POLICY | 0x04)) SEV_POLICY=$(printf ",policy=%#x" $POLICY) - SEV_POLICY=",policy=0xB0000" fi if [ "${SEV_SNP}" = 1 ]; then SEV_GUEST_SNP=",snp=yes" + POLICY=$((0x30000)) + SEV_POLICY=$(printf ",policy=%#x" $POLICY) + [ "${ALLOW_DEBUG}" = "1" ] && POLICY=$((POLICY | 0x80000)) + # check if THP is disable cat /sys/kernel/mm/transparent_hugepage/enabled | grep -w "\[never\]" if [ $? -ne 0 ]; then -- cgit v1.2.3-71-gd317