aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2021-05-20 20:39:48 +0200
committerMarvin Borner2021-05-20 20:39:48 +0200
commitb22346a9b830b642e684e13cf4946d8ef8d8e1ca (patch)
tree80373376518d3daffd2b8b986b3875a893771103
parent519a1de7d9fe809efc4077933fabbe93a8da9439 (diff)
Enabled KVM by default
-rwxr-xr-xrun3
1 files changed, 2 insertions, 1 deletions
diff --git a/run b/run
index ca40fd1..c36cc2e 100755
--- a/run
+++ b/run
@@ -28,7 +28,8 @@ no_ask="${2}"
# TODO: Support -enable-kvm: GPF?!
qemu_with_flags() {
network="rtl8139"
- qemu-system-i386 -d guest_errors,unimp,pcall -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -netdev user,id=net0,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000 -device $network,netdev=net0 -object filter-dump,id=dump,netdev=net0,file=dump.pcap "$@"
+ [ -e /dev/kvm ] && [ -r /dev/kvm ] && [ -w /dev/kvm ] && accel="-enable-kvm" || echo "KVM acceleration not available. Make sure your PC supports it and that you're in the KVM group"
+ qemu-system-i386 -d guest_errors,unimp,pcall -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -netdev user,id=net0,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000 -device $network,netdev=net0 -object filter-dump,id=dump,netdev=net0,file=dump.pcap $accel "$@"
}
make_cross() {