[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 02/12] accel: Introduce 'query-accels' QMP command
From: |
Alex Bennée |
Subject: |
Re: [PATCH v8 02/12] accel: Introduce 'query-accels' QMP command |
Date: |
Thu, 03 Jun 2021 18:19:15 +0100 |
User-agent: |
mu4e 1.5.13; emacs 28.0.50 |
Philippe Mathieu-Daudé <philmd@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 <eblake@redhat.com>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@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
--
Alex Bennée