mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
qemu: Only probe KVM on Linux
We already know it's not going to be available on other platforms. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Andrea Bolognani <abologna@redhat.com> Tested-by: Brad Laue <brad@brad-x.com> Tested-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Ani Sinha <ani@anisinha.ca> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
31e937fb3b
commit
8885cd9a76
@ -9239,6 +9239,12 @@ qemuProcessQMPInit(qemuProcessQMP *proc)
|
||||
}
|
||||
|
||||
|
||||
#if defined(__linux__)
|
||||
# define hwaccel "kvm:tcg"
|
||||
#else
|
||||
# define hwaccel "tcg"
|
||||
#endif
|
||||
|
||||
static int
|
||||
qemuProcessQMPLaunch(qemuProcessQMP *proc)
|
||||
{
|
||||
@ -9249,7 +9255,7 @@ qemuProcessQMPLaunch(qemuProcessQMP *proc)
|
||||
if (proc->forceTCG)
|
||||
machine = "none,accel=tcg";
|
||||
else
|
||||
machine = "none,accel=kvm:tcg";
|
||||
machine = "none,accel=" hwaccel;
|
||||
|
||||
VIR_DEBUG("Try to probe capabilities of '%s' via QMP, machine %s",
|
||||
proc->binary, machine);
|
||||
|
Loading…
Reference in New Issue
Block a user