[libvirt PATCH 01/20] qemu: Only probe KVM on Linux
Ani Sinha
ani at anisinha.ca
Mon Jan 17 12:55:12 UTC 2022
On Mon, Jan 17, 2022 at 4:23 PM Andrea Bolognani <abologna at redhat.com>
wrote:
> We already know it's not going to be available on other
> platforms.
>
> Suggested-by: Daniel P. Berrangé <berrange at redhat.com>
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> Tested-by: Brad Laue <brad at brad-x.com>
Reviewed-by: Ani Sinha <ani at anisinha.ca>
> ---
> src/qemu/qemu_process.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 5c9ca0fe4f..c2c10d282a 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -9269,6 +9269,12 @@ qemuProcessQMPInit(qemuProcessQMP *proc)
> }
>
>
> +#if defined(__linux__)
> +# define hwaccel "kvm:tcg"
> +#else
> +# define hwaccel "tcg"
> +#endif
> +
> static int
> qemuProcessQMPLaunch(qemuProcessQMP *proc)
> {
> @@ -9279,7 +9285,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);
> --
> 2.34.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220117/316fbca3/attachment-0001.htm>
More information about the libvir-list
mailing list