[Qemu-devel] [PATCH 0/1] -accel should list enabled accelerators

Wainer dos Santos Moschetta posted 1 patch 4 years, 11 months ago
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test s390x passed
Test checkpatch passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190530215755.328-1-wainersm@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>
vl.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH 0/1] -accel should list enabled accelerators
Posted by Wainer dos Santos Moschetta 4 years, 11 months ago
On this series I changed the semantics of -accel help so that
it shows only the accelerators enabled in the QEMU target
binary. This behavior is now alike -cpu and -machine helps.

Another reason for this proposal is that I am working on
an improvement of Avocado QEMU framework which should skip
tests tagged with, e.g, "accel:tcg" if tcg is not enabled
in the binary. And it seems the best approach to detect
the presence (or not) of an accelerator is to query QEMU
with -accel help.

Phillipe Mathieu-Daudé proposed a similar fix [1] but it
was never merged. My patch is slightly different but it
implements some decisions that seemed consensus at that time:

1. Do not display qtest. It's an internal only accelerator.
2. It should display those that have support on the target
binary, regardless if they are not present on the host.

Example with this patch on x86_64 host (kvm not installed):
---
$ configure --enable-kvm --enable-xen --target-list="x86_64-softmmu ppc64-softmmu"
$ x86_64-softmmu/qemu-system-x86_64 -accel help
Accelerators supported in QEMU binary:
tcg
xen
kvm
$ ppc64-softmmu/qemu-system-ppc64 -accel help
Accelerators supported in QEMU binary:
tcg
---

Git: https://github.com/wainersm/qemu
Branch: accel_list
Travis: https://travis-ci.org/wainersm/qemu/builds/539366851

[1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg491542.html

Wainer dos Santos Moschetta (1):
  vl: make -accel help to list enabled accelerators only

 vl.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

-- 
2.21.0