[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 09/18] vl: warn for unavailable accelerators, clarify messages
From: |
Paolo Bonzini |
Subject: |
[PATCH v2 09/18] vl: warn for unavailable accelerators, clarify messages |
Date: |
Mon, 9 Dec 2019 16:01:36 +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 f0cb438..58aad4f 100644
--- a/vl.c
+++ b/vl.c
@@ -2848,6 +2848,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);
@@ -2902,6 +2904,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 {
@@ -2921,7 +2926,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 (!tcg_enabled() && use_icount) {
--
1.8.3.1
- [PATCH v2 04/18] vl: extract accelerator option processing to a separate function, (continued)
- [PATCH v2 04/18] vl: extract accelerator option processing to a separate function, Paolo Bonzini, 2019/12/09
- [PATCH v2 05/18] vl: merge -accel processing into configure_accelerators, Paolo Bonzini, 2019/12/09
- [PATCH v2 03/18] tcg: move qemu_tcg_configure to accel/tcg/tcg-all.c, Paolo Bonzini, 2019/12/09
- [PATCH v2 06/18] accel: compile accel/accel.c just once, Paolo Bonzini, 2019/12/09
- [PATCH v2 09/18] vl: warn for unavailable accelerators, clarify messages,
Paolo Bonzini <=
- [PATCH v2 11/18] qom: add object_new_with_class, Paolo Bonzini, 2019/12/09
- [PATCH v2 08/18] vl: configure accelerators from -accel options, Paolo Bonzini, 2019/12/09
- [PATCH v2 12/18] accel: pass object to accel_init_machine, Paolo Bonzini, 2019/12/09
- [PATCH v2 07/18] vl: introduce object_parse_property_opt, Paolo Bonzini, 2019/12/09
- [PATCH v2 13/18] tcg: convert "-accel threads" to a QOM property, Paolo Bonzini, 2019/12/09
- [PATCH v2 10/18] qom: introduce object_register_sugar_prop, Paolo Bonzini, 2019/12/09