Philippe Mathieu-Daudé <[email protected]> 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 <[email protected]>
> Reviewed-by: Alex Bennée <[email protected]>
> Tested-by: Alex Bennée <[email protected]>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
> ---
> 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
--
Alex Bennée