[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/22] vl: fix breakage of -tb-size
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH 01/22] vl: fix breakage of -tb-size |
Date: |
Tue, 11 Jul 2017 16:37:59 +0100 |
User-agent: |
mu4e 0.9.19; emacs 25.2.50.3 |
Emilio G. Cota <address@hidden> writes:
> Commit e7b161d573 ("vl: add tcg_enabled() for tcg related code") adds
> a check to exit the program when !tcg_enabled() while parsing the -tb-size
> flag.
>
> It turns out that when the -tb-size flag is evaluated, tcg_enabled() can
> only return 0, since it is set (or not) much later by configure_accelerator().
>
> Fix it by unconditionally exiting if the flag is passed to a QEMU binary
> built with !CONFIG_TCG.
>
> Signed-off-by: Emilio G. Cota <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Tested-by: Alex Bennée <address@hidden>
> ---
> vl.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index d17c863..9ece570 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3933,10 +3933,10 @@ int main(int argc, char **argv, char **envp)
> configure_rtc(opts);
> break;
> case QEMU_OPTION_tb_size:
> - if (!tcg_enabled()) {
> - error_report("TCG is disabled");
> - exit(1);
> - }
> +#ifndef CONFIG_TCG
> + error_report("TCG is disabled");
> + exit(1);
> +#endif
> if (qemu_strtoul(optarg, NULL, 0, &tcg_tb_size) < 0) {
> error_report("Invalid argument to -tb-size");
> exit(1);
--
Alex Bennée
- [Qemu-devel] [PATCH 00/22] tcg: per-thread TCG, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 01/22] vl: fix breakage of -tb-size, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 18/22] tcg: define TCG_HIGHWATER, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 13/22] tcg: take tb_ctx out of TCGContext, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 10/22] exec-all: move tb->invalid to the end of the struct, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 20/22] tcg: dynamically allocate from code_gen_buffer using equally-sized regions, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 03/22] cputlb: bring back tlb_flush_count under !TLB_DEBUG, Emilio G. Cota, 2017/07/09