cachepc

Prime+Probe cache-based side-channel attack on AMD SEV-SNP protected virtual machines
git clone https://git.sinitax.com/sinitax/cachepc
Log | Files | Refs | Submodules | README | sfeed.txt

install.sh (706B)


      1#!/bin/sh
      2
      3set -ex
      4
      5gitroot=$(git rev-parse --show-toplevel)
      6cd "$gitroot/qemu"
      7
      8DISK="guest.qcow2"
      9DEBIANISO="debian-11.4.0-amd64-DVD-1.iso"
     10
     11if [ ! -e "$DISK" ]; then
     12	echo "Creating guest disk.."
     13	qemu-img create -f qcow2 "$DISK" 20G
     14fi
     15
     16if [ ! -e "$DEBIANISO" ]; then
     17	echo "Downloading debian DVD image.."
     18	wget "https://cdimage.debian.org/mirror/cdimage/archive/11.4.0/amd64/iso-dvd/debian-11.4.0-amd64-DVD-1.iso" -O "$DEBIANISO"
     19fi
     20
     21sudo LIBVIRT_DEBUG=1 virsh net-start default 2>&1 | grep -i warning || true
     22
     23sudo PREFIX="$gitroot/AMDSEV" "$gitroot/AMDSEV/launch-qemu.sh" \
     24	-hda "$DISK" \
     25	-console serial \
     26	-vnc 1 \
     27	-mem 2024 \
     28	-smp 1,cores=4,threads=2 \
     29	-allow-debug \
     30	-cdrom "$DEBIANISO"
     31