[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/87] vl: warn for unavailable accelerators, clarify messages
From: |
Paolo Bonzini |
Subject: |
[PULL 20/87] vl: warn for unavailable accelerators, clarify messages |
Date: |
Wed, 18 Dec 2019 13:01:46 +0100 |
So far, specifying an accelerator that was not compiled in did not result
in an error; fix that.
While at it, clarify the mysterious "Back to TCG" message.
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
vl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index 0f620be..c350eef 100644
--- a/vl.c
+++ b/vl.c
@@ -2723,6 +2723,8 @@ static int do_configure_accelerator(void *opaque,
QemuOpts *opts, Error **errp)
int ret;
if (!ac) {
+ *p_init_failed = true;
+ error_report("invalid accelerator %s", acc);
return 0;
}
ret = accel_init_machine(ac, current_machine);
@@ -2777,6 +2779,9 @@ static void configure_accelerators(const char *progname)
*/
if (accel_find(*tmp)) {
qemu_opts_parse_noisily(qemu_find_opts("accel"), *tmp, true);
+ } else {
+ init_failed = true;
+ error_report("invalid accelerator %s", *tmp);
}
}
} else {
@@ -2796,7 +2801,7 @@ static void configure_accelerators(const char *progname)
if (init_failed) {
AccelClass *ac = ACCEL_GET_CLASS(current_machine->accelerator);
- error_report("Back to %s accelerator", ac->name);
+ error_report("falling back to %s", ac->name);
}
if (use_icount && !(tcg_enabled() || qtest_enabled())) {
--
1.8.3.1
- [PULL 32/87] build-sys: build vhost-user-gpu only if CONFIG_TOOLS, (continued)
- [PULL 32/87] build-sys: build vhost-user-gpu only if CONFIG_TOOLS, Paolo Bonzini, 2019/12/18
- [PULL 26/87] xen: convert "-machine igd-passthru" to an accelerator property, Paolo Bonzini, 2019/12/18
- [PULL 18/87] vl: introduce object_parse_property_opt, Paolo Bonzini, 2019/12/18
- [PULL 10/87] migration-test: Rename cmd_src/dst to arch_source/arch_target, Paolo Bonzini, 2019/12/18
- [PULL 17/87] accel: compile accel/accel.c just once, Paolo Bonzini, 2019/12/18
- [PULL 19/87] vl: configure accelerators from -accel options, Paolo Bonzini, 2019/12/18
- [PULL 28/87] kvm: introduce kvm_kernel_irqchip_* functions, Paolo Bonzini, 2019/12/18
- [PULL 33/87] build-sys: do not include Windows SLIRP dependencies in $LIBS, Paolo Bonzini, 2019/12/18
- [PULL 34/87] migration: fix maybe-uninitialized warning, Paolo Bonzini, 2019/12/18
- [PULL 21/87] qom: introduce object_register_sugar_prop, Paolo Bonzini, 2019/12/18
- [PULL 20/87] vl: warn for unavailable accelerators, clarify messages,
Paolo Bonzini <=
- [PULL 24/87] tcg: convert "-accel threads" to a QOM property, Paolo Bonzini, 2019/12/18
- [PULL 30/87] Makefile: remove unused variables, Paolo Bonzini, 2019/12/18
- [PULL 27/87] kvm: convert "-machine kvm_shadow_mem" to an accelerator property, Paolo Bonzini, 2019/12/18
- [PULL 35/87] monitor: fix maybe-uninitialized, Paolo Bonzini, 2019/12/18
- [PULL 36/87] vhost-user-scsi: fix printf format warning, Paolo Bonzini, 2019/12/18
- [PULL 38/87] tests: skip block layer tests if !CONFIG_TOOLS, Paolo Bonzini, 2019/12/18
- [PULL 41/87] stubs: replace stubs with lnot if applicable, Paolo Bonzini, 2019/12/18
- [PULL 43/87] configure: simplify vhost condition with Kconfig, Paolo Bonzini, 2019/12/18
- [PULL 37/87] os-posix: simplify os_find_datadir, Paolo Bonzini, 2019/12/18
- [PULL 39/87] libvixl: remove per-target compiler flags, Paolo Bonzini, 2019/12/18