| #include "android/utils/debug.h" |
| #define D(...) VERBOSE_PRINT(init,__VA_ARGS__) |
| /* A simple routine used to check that we can run the program under KVM. |
| * We simply want to ensure that the kvm driver is loaded and that the |
| * corresponding device file is accessible by the user. |
| #error "This file should only be compiled under linux" |
| /* Is there a /dev/kvm device file here? */ |
| if (access("/dev/kvm",F_OK)) { |
| /* no need to print a warning here */ |
| D("No kvm device file detected"); |
| if (access("/dev/kvm",R_OK)) { |
| D("KVM device file is not readable for this user."); |
| D("KVM mode auto-enabled!"); |