forked from synercys/eurosys-kfuse-artifact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
launch_vm.sh
executable file
·25 lines (23 loc) · 915 Bytes
/
launch_vm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# trap "unset_cpufreq" EXIT
set_cpufreq() {
sudo cpupower frequency-set -d 2099MHz -u 2100MHz
sudo cpupower frequency-set -g performance
}
unset_cpufreq() {
sudo cpupower frequency-set -d 800MHz -u 2100MHz
sudo cpupower frequency-set -g ondemand
}
if [ $1 == "1" ]; then
sudo ./scripts/qemu_kernel.sh vm/kfuse-retpoline-vm rootfs.ext4 /init.sh
elif [ $1 == "2" ]; then
sudo ./scripts/qemu_kernel.sh vm/nokfuse-retpoline-vm rootfs.ext4 /init.sh
elif [ $1 == "3" ]; then
sudo ./scripts/qemu_kernel.sh vm/kfuse-noretpoline-vm rootfs.ext4 /init.sh
elif [ $1 == "4" ]; then
sudo ./scripts/qemu_kernel.sh vm/nokfuse-noretpoline-vm rootfs.ext4 /init.sh
elif [ $1 == "5" ]; then
sudo ./scripts/qemu_kernel.sh vm/kfuse-retpoline-tail-vm rootfs.ext4 /init.sh
elif [ $1 == "6" ]; then
sudo ./scripts/qemu_kernel.sh vm/nokfuse-retpoline-indirect-vm rootfs.ext4 /init.sh
fi