]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Don't check for /dev/kvm presence
authorAndrea Bolognani <abologna@redhat.com>
Fri, 14 Sep 2018 06:43:44 +0000 (08:43 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 17 Sep 2018 13:08:48 +0000 (15:08 +0200)
The file being present doesn't necessarily mean anything these
days, as it's created independently of whether the kvm module
has been loaded[1]; moreover, we're already gathering all the
information we need through QMP, so poking the filesystem at
all is entirely unnecessary.

[1] https://github.com/systemd/systemd/commit/d35d6249d5a7ed3228

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_capabilities.c

index 94fb062d01c1c681bd1d69efbbf54feb27c82d89..04c2adcfb5b834c70d4bbd219dc1429da62e6f95 100644 (file)
@@ -834,9 +834,8 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
     if (!binary)
         return 0;
 
-    if (virFileExists("/dev/kvm") &&
-        (virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM) ||
-         kvmbin))
+    if (virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM) ||
+        kvmbin)
         haskvm = true;
 
     if (virQEMUCapsGetMachineTypesCaps(qemubinCaps, &nmachines, &machines) < 0)