* [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator
@ 2017-09-13 17:29 Cornelia Huck
2017-09-13 17:39 ` Thomas Huth
2017-09-13 18:09 ` Richard Henderson
0 siblings, 2 replies; 4+ messages in thread
From: Cornelia Huck @ 2017-09-13 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: lvivier, pbonzini, thuth, mreitz, kwolf, richard.henderson,
peter.maydell, Cornelia Huck
configure_accelerator() falls back to tcg if no accelerator has
been specified. Formerly, we could be sure that tcg is always
available; however, with --disable-tcg, this is not longer true,
and you are not able to start qemu without explicitly specifying
another accelerator on those builds.
Instead, choose an accelerator in the order tcg->kvm->hax.
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
RFC->v2:
- drop xen from the list of fallbacks
- use comma-delimited list of accelerators (much easier)
- changed one place in qemu-options.hx that had been missed
---
accel/accel.c | 3 +--
qemu-options.hx | 8 +++++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/accel/accel.c b/accel/accel.c
index 8ae40e1e13..e8a3121d06 100644
--- a/accel/accel.c
+++ b/accel/accel.c
@@ -79,8 +79,7 @@ void configure_accelerator(MachineState *ms)
accel = qemu_opt_get(qemu_get_machine_opts(), "accel");
if (accel == NULL) {
- /* Use the default "accelerator", tcg */
- accel = "tcg";
+ accel = "tcg:kvm:hax";
}
p = accel;
diff --git a/qemu-options.hx b/qemu-options.hx
index 9f6e2adfff..2ff88389e0 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -31,7 +31,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
"-machine [type=]name[,prop[=value][,...]]\n"
" selects emulated machine ('-machine help' for list)\n"
" property accel=accel1[:accel2[:...]] selects accelerator\n"
- " supported accelerators are kvm, xen, hax or tcg (default: tcg)\n"
+ " supported accelerators are kvm, xen, hax or tcg (default: tcg:kvm:hax)\n"
" kernel_irqchip=on|off|split controls accelerated irqchip support (default=off)\n"
" vmport=on|off|auto controls emulation of vmport (default: auto)\n"
" kvm_shadow_mem=size of KVM shadow MMU in bytes\n"
@@ -66,7 +66,8 @@ Supported machine properties are:
@table @option
@item accel=@var{accels1}[:@var{accels2}[:...]]
This is used to enable an accelerator. Depending on the target architecture,
-kvm, xen, hax or tcg can be available. By default, tcg is used. If there is
+kvm, xen, hax or tcg can be available. By default, the first one available
+out of tcg, kvm, hax (in that order) is used. If there is
more than one accelerator specified, the next one is used if the previous one
fails to initialize.
@item kernel_irqchip=on|off
@@ -126,7 +127,8 @@ STEXI
@item -accel @var{name}[,prop=@var{value}[,...]]
@findex -accel
This is used to enable an accelerator. Depending on the target architecture,
-kvm, xen, hax or tcg can be available. By default, tcg is used. If there is
+kvm, xen, hax or tcg can be available. By default, the first one available
+out of tcg, kvm, hax (in that order) is used. If there is
more than one accelerator specified, the next one is used if the previous one
fails to initialize.
@table @option
--
2.13.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator
2017-09-13 17:29 [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator Cornelia Huck
@ 2017-09-13 17:39 ` Thomas Huth
2017-09-13 18:09 ` Richard Henderson
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2017-09-13 17:39 UTC (permalink / raw)
To: Cornelia Huck, qemu-devel
Cc: lvivier, pbonzini, mreitz, kwolf, richard.henderson, peter.maydell
On 13.09.2017 19:29, Cornelia Huck wrote:
> configure_accelerator() falls back to tcg if no accelerator has
> been specified. Formerly, we could be sure that tcg is always
> available; however, with --disable-tcg, this is not longer true,
> and you are not able to start qemu without explicitly specifying
> another accelerator on those builds.
>
> Instead, choose an accelerator in the order tcg->kvm->hax.
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> RFC->v2:
> - drop xen from the list of fallbacks
> - use comma-delimited list of accelerators (much easier)
> - changed one place in qemu-options.hx that had been missed
> ---
> accel/accel.c | 3 +--
> qemu-options.hx | 8 +++++---
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/accel/accel.c b/accel/accel.c
> index 8ae40e1e13..e8a3121d06 100644
> --- a/accel/accel.c
> +++ b/accel/accel.c
> @@ -79,8 +79,7 @@ void configure_accelerator(MachineState *ms)
>
> accel = qemu_opt_get(qemu_get_machine_opts(), "accel");
> if (accel == NULL) {
> - /* Use the default "accelerator", tcg */
> - accel = "tcg";
> + accel = "tcg:kvm:hax";
> }
>
> p = accel;
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 9f6e2adfff..2ff88389e0 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -31,7 +31,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
> "-machine [type=]name[,prop[=value][,...]]\n"
> " selects emulated machine ('-machine help' for list)\n"
> " property accel=accel1[:accel2[:...]] selects accelerator\n"
> - " supported accelerators are kvm, xen, hax or tcg (default: tcg)\n"
> + " supported accelerators are kvm, xen, hax or tcg (default: tcg:kvm:hax)\n"
> " kernel_irqchip=on|off|split controls accelerated irqchip support (default=off)\n"
> " vmport=on|off|auto controls emulation of vmport (default: auto)\n"
> " kvm_shadow_mem=size of KVM shadow MMU in bytes\n"
> @@ -66,7 +66,8 @@ Supported machine properties are:
> @table @option
> @item accel=@var{accels1}[:@var{accels2}[:...]]
> This is used to enable an accelerator. Depending on the target architecture,
> -kvm, xen, hax or tcg can be available. By default, tcg is used. If there is
> +kvm, xen, hax or tcg can be available. By default, the first one available
> +out of tcg, kvm, hax (in that order) is used. If there is
> more than one accelerator specified, the next one is used if the previous one
> fails to initialize.
> @item kernel_irqchip=on|off
> @@ -126,7 +127,8 @@ STEXI
> @item -accel @var{name}[,prop=@var{value}[,...]]
> @findex -accel
> This is used to enable an accelerator. Depending on the target architecture,
> -kvm, xen, hax or tcg can be available. By default, tcg is used. If there is
> +kvm, xen, hax or tcg can be available. By default, the first one available
> +out of tcg, kvm, hax (in that order) is used. If there is
> more than one accelerator specified, the next one is used if the previous one
> fails to initialize.
> @table @option
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator
2017-09-13 17:29 [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator Cornelia Huck
2017-09-13 17:39 ` Thomas Huth
@ 2017-09-13 18:09 ` Richard Henderson
2017-11-07 16:59 ` Cornelia Huck
1 sibling, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2017-09-13 18:09 UTC (permalink / raw)
To: Cornelia Huck, qemu-devel
Cc: lvivier, pbonzini, thuth, mreitz, kwolf, peter.maydell
On 09/13/2017 10:29 AM, Cornelia Huck wrote:
> configure_accelerator() falls back to tcg if no accelerator has
> been specified. Formerly, we could be sure that tcg is always
> available; however, with --disable-tcg, this is not longer true,
> and you are not able to start qemu without explicitly specifying
> another accelerator on those builds.
>
> Instead, choose an accelerator in the order tcg->kvm->hax.
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> RFC->v2:
> - drop xen from the list of fallbacks
> - use comma-delimited list of accelerators (much easier)
> - changed one place in qemu-options.hx that had been missed
Queued to tcg-next. Thanks,
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator
2017-09-13 18:09 ` Richard Henderson
@ 2017-11-07 16:59 ` Cornelia Huck
0 siblings, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2017-11-07 16:59 UTC (permalink / raw)
To: Richard Henderson
Cc: qemu-devel, lvivier, pbonzini, thuth, mreitz, kwolf, peter.maydell
On Wed, 13 Sep 2017 11:09:04 -0700
Richard Henderson <richard.henderson@linaro.org> wrote:
> On 09/13/2017 10:29 AM, Cornelia Huck wrote:
> > configure_accelerator() falls back to tcg if no accelerator has
> > been specified. Formerly, we could be sure that tcg is always
> > available; however, with --disable-tcg, this is not longer true,
> > and you are not able to start qemu without explicitly specifying
> > another accelerator on those builds.
> >
> > Instead, choose an accelerator in the order tcg->kvm->hax.
> >
> > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> > ---
> > RFC->v2:
> > - drop xen from the list of fallbacks
> > - use comma-delimited list of accelerators (much easier)
> > - changed one place in qemu-options.hx that had been missed
>
> Queued to tcg-next. Thanks,
Hm, has this fallen through the cracks?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-07 16:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-13 17:29 [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator Cornelia Huck
2017-09-13 17:39 ` Thomas Huth
2017-09-13 18:09 ` Richard Henderson
2017-11-07 16:59 ` Cornelia Huck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.