ClangBuiltLinux / continuous-integration

Continuous integration of latest Linux kernel with daily build of Clang & LLVM tools
https://travis-ci.com/ClangBuiltLinux/continuous-integration
Apache License 2.0
44 stars 18 forks source link

driver.sh: Use KVM when possible #173

Closed nathanchance closed 5 years ago

nathanchance commented 5 years ago

This speeds up my local boots by 10s on average (24s to 14s).

We cannot unconditionally enable this because some machines (like the ones on Travis CI) do not have KVM support, which would cause an error:

Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory

https://travis-ci.com/nathanchance/continuous-integration/jobs/205427268

Check that the CPU supports virtualization from /proc/cpuinfo and that the kvm module is enabled. As far as I can tell, every major distribution sets CONFIG_KVM to m.

This is primarily aimed at local development (especially after #172) but Travis may eventually gain virtualization support, which would speed up CI.

Presubmit: https://travis-ci.com/nathanchance/continuous-integration/builds/114330882