On 6/3/21 1:26 AM, John Snow wrote: > On 5/26/21 1:04 PM, Philippe Mathieu-Daudé wrote: >> 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). >> > > Hi Phil -- Unfortunately I think I am going to defer on this one until > Markus is back. I need to chat with him about the right way to design > this, since I'm also not entirely clear on it myself.
OK, thanks for the update :)