[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/16] vl: warn for unavailable accelerators, clarify messages
From: |
Paolo Bonzini |
Subject: |
[PATCH 07/16] vl: warn for unavailable accelerators, clarify messages |
Date: |
Wed, 13 Nov 2019 15:38:56 +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.
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 dd895db..843b263 100644
--- a/vl.c
+++ b/vl.c
@@ -2853,6 +2853,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);
@@ -2907,6 +2909,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 {
@@ -2926,7 +2931,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 03/16] vl: merge -accel processing into configure_accelerators, (continued)
- [PATCH 03/16] vl: merge -accel processing into configure_accelerators, Paolo Bonzini, 2019/11/13
- [PATCH 05/16] vl: introduce object_parse_property_opt, Paolo Bonzini, 2019/11/13
- [PATCH 06/16] vl: configure accelerators from -accel options, Paolo Bonzini, 2019/11/13
- [PATCH 07/16] vl: warn for unavailable accelerators, clarify messages,
Paolo Bonzini <=
- [PATCH 08/16] qom: introduce object_register_sugar_prop, Paolo Bonzini, 2019/11/13
- [PATCH 09/16] qom: add object_new_with_class, Paolo Bonzini, 2019/11/13
- [PATCH 10/16] accel: pass object to accel_init_machine, Paolo Bonzini, 2019/11/13
- [PATCH 12/16] tcg: add "-accel tcg,tb-size" and deprecate "-tb-size", Paolo Bonzini, 2019/11/13