aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2021-08-20 11:48:44 -0500
committerBrijesh Singh <brijesh.singh@amd.com>2021-08-20 11:48:44 -0500
commitf12e63e0716e7b23a8284cfec3433a17fd1f562b (patch)
treef36cb962fa491bcf63724aa0ea2b374fd6c5afa9
parent45dcd909861eebb4fba4349788b261d4cb7877d6 (diff)
downloadcachepc-amdsev-f12e63e0716e7b23a8284cfec3433a17fd1f562b.tar.gz
cachepc-amdsev-f12e63e0716e7b23a8284cfec3433a17fd1f562b.zip
update to use newer commit
-rwxr-xr-xlaunch-qemu.sh17
-rw-r--r--stable-commits6
2 files changed, 10 insertions, 13 deletions
diff --git a/launch-qemu.sh b/launch-qemu.sh
index c5fff7b..e8a4722 100755
--- a/launch-qemu.sh
+++ b/launch-qemu.sh
@@ -53,6 +53,7 @@ run_cmd () {
}
get_cbitpos() {
+ modprobe cpuid
#
# Get C-bit position directly from the hardware
# Reads of /dev/cpu/x/cpuid have to be 16 bytes in size
@@ -215,6 +216,9 @@ fi
# If this is SEV guest then add the encryption device objects to enable support
if [ ${SEV} = "1" ]; then
+ add_opts "-machine memory-encryption=sev0,vmport=off"
+ get_cbitpos
+
if [ "${ALLOW_DEBUG}" = "1" -o "${SEV_ES}" = 1 ]; then
POLICY=$((0x01))
[ "${ALLOW_DEBUG}" = "1" ] && POLICY=$((POLICY & ~0x01))
@@ -223,17 +227,10 @@ if [ ${SEV} = "1" ]; then
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))
+ add_opts "-object sev-snp-guest,id=sev0,cbitpos=${CBITPOS},reduced-phys-bits=1"
+ else
+ add_opts "-object sev-guest,id=sev0${SEV_POLICY},cbitpos=${CBITPOS},reduced-phys-bits=1"
fi
-
- get_cbitpos
-
- add_opts "-object sev-guest,id=sev0${SEV_POLICY},cbitpos=${CBITPOS},reduced-phys-bits=1${SEV_GUEST_SNP}"
- add_opts "-machine memory-encryption=sev0,vmport=off"
fi
# if -kernel arg is specified then use the kernel provided in command line for boot
diff --git a/stable-commits b/stable-commits
index 1de4710..bbe0759 100644
--- a/stable-commits
+++ b/stable-commits
@@ -4,12 +4,12 @@
# hypervisor commit
KERNEL_GIT_URL="https://github.com/AMDESE/linux.git"
-KERNEL_BRANCH="sev-snp-part2-rfc4"
+KERNEL_BRANCH="sev-snp-part2-v5"
# qemu commit
QEMU_GIT_URL="https://github.com/AMDESE/qemu.git"
-QEMU_BRANCH="sev-snp-devel"
+QEMU_BRANCH="snp-rfc-v2"
# guest bios
OVMF_GIT_URL="https://github.com/AMDESE/ovmf.git"
-OVMF_BRANCH="sev-snp-rfc-5"
+OVMF_BRANCH="sev-snp-v6"