Don't check for /dev/kvm etc am: 459a5da940

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/2010756

Change-Id: I71f28092ffff46b1d84a4f1d8bfe74f117a48ac2
diff --git a/tests/common.cc b/tests/common.cc
index 9602283..5d32351 100644
--- a/tests/common.cc
+++ b/tests/common.cc
@@ -14,14 +14,22 @@
  * limitations under the License.
  */
 
+#include <android/sysprop/HypervisorProperties.sysprop.h>
+
 #include "virt/VirtualizationTest.h"
 
+using android::sysprop::HypervisorProperties::hypervisor_protected_vm_supported;
+using android::sysprop::HypervisorProperties::hypervisor_vm_supported;
+
 namespace {
 
 bool isVmSupported() {
-    const std::array<const char *, 4> needed_files = {
-            "/dev/kvm",
-            "/dev/vhost-vsock",
+    bool has_capability = hypervisor_vm_supported().value_or(false) ||
+            hypervisor_protected_vm_supported().value_or(false);
+    if (!has_capability) {
+        return false;
+    }
+    const std::array<const char *, 2> needed_files = {
             "/apex/com.android.virt/bin/crosvm",
             "/apex/com.android.virt/bin/virtualizationservice",
     };