On 6/3/21 7:19 PM, Alex Bennée wrote: > > Philippe Mathieu-Daudé <phi...@redhat.com> writes: > >> Introduce the 'query-accels' QMP command which returns a list >> of built-in accelerator names. >> >> - Accelerator is a QAPI enum of all existing accelerators, >> >> - AcceleratorInfo is a QAPI structure providing accelerator >> specific information. Currently the common structure base >> provides the name of the accelerator, while the specific >> part is empty, but each accelerator can expand it. >> >> - 'query-accels' QMP command returns a list of @AcceleratorInfo >> >> For example on a KVM-only build we get: >> >> { "execute": "query-accels" } >> { >> "return": [ >> { >> "name": "qtest" >> }, >> { >> "name": "kvm" >> } >> ] >> } >> >> Reviewed-by: Eric Blake <ebl...@redhat.com> >> Reviewed-by: Alex Bennée <alex.ben...@linaro.org> >> Tested-by: Alex Bennée <alex.ben...@linaro.org> >> Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> >> --- >> v8: >> - Include code snippet from Markus adding to machine-target.json >> to be able to use enum values or union branches conditional. >> - Use accel_find() on enum to be sure the accelerator is enabled >> at runtime (chat with jsnow / eblake). > > Hmm something broke because now I get: > > /usr/lib/x86_64-linux-gnu/libpixman-1.so -lgthread-2.0 -lglib-2.0 -lstdc++ > -Wl,--end-group > /usr/bin/ld: libqemu-aarch64_be-linux-user.fa.p/accel_accel-qmp.c.o: in > function `qmp_query_accels': > /home/alex/lsrc/qemu.git/builds/arm.all/../../accel/accel-qmp.c:15: undefined > reference to `Accelerator_lookup' > collect2: error: ld returned 1 exit status > [1327/1413] Linking target qemu-io
Sorry I missed that for user-mode, will be fixed in v9.