[PATCH v2 0/1] Improve module accelerator error message

Jose R. Ziviani posted 1 patch 2 years, 9 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210722220952.17444-1-jziviani@suse.de
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
accel/accel-softmmu.c |  5 ++++-
util/module.c         | 14 ++++++++------
2 files changed, 12 insertions(+), 7 deletions(-)
[PATCH v2 0/1] Improve module accelerator error message
Posted by Jose R. Ziviani 2 years, 9 months ago
v1 -> v2:
* Moved the code to module.c
* Simplified a lot by using current module DB to get info

The main objective is to improve the error message when trying to
load a not found/not installed module TCG.

For example:

$ qemu-system-x86_64 -accel tcg
ERROR:../accel/accel-softmmu.c:82:accel_init_ops_interfaces: assertion failed: 
(ops != NULL)
Bail out! ERROR:../accel/accel-softmmu.c:82:accel_init_ops_interfaces: 
assertion failed: (ops != NULL)
[1]    31964 IOT instruction (core dumped)  ./qemu-system-x86_64 ...

To:
$ qemu-system-x86_64 -accel tcg
accel-tcg-x86_64 module is missing, install the package or config the library 
path correctly.

Jose R. Ziviani (1):
  modules: Improve error message when module is not found

 accel/accel-softmmu.c |  5 ++++-
 util/module.c         | 14 ++++++++------
 2 files changed, 12 insertions(+), 7 deletions(-)

-- 
2.32.0