qemu: Avoid probing non-native binaries all the time

A side effect of recent changes is that we would always try
to regenerate the capabilities cache for non-native QEMU
binaries based on /dev/kvm availability, which is of course
complete nonsense. Make sure that doesn't happen.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Andrea Bolognani 2018-09-17 12:23:43 +02:00
parent 88983855d5
commit 55e5eb9478

View File

@ -3932,6 +3932,14 @@ virQEMUCapsIsValid(void *data,
return false;
}
if (!virQEMUCapsGuestIsNative(priv->hostArch, qemuCaps->arch)) {
VIR_DEBUG("Guest arch (%s) is not native to host arch (%s), "
"skipping KVM-related checks",
virArchToString(qemuCaps->arch),
virArchToString(priv->hostArch));
return true;
}
kvmUsable = virFileAccessibleAs("/dev/kvm", R_OK | W_OK,
priv->runUid, priv->runGid) == 0;