On Thu, 8 Aug 2024 at 06:35, Markus Armbruster <arm...@redhat.com> wrote:
> Options:
>
> 1. Approximate symbols from CONFIG_DEVICES with symbols from
>    CONFIG_TARGET.  This is what we do now.
>
> 2. Use symbols from CONFIG_DEVICES.  Generated headers are no longer
>    self-contained.  Strong dislike.
>
> 3. Define device-specific stuff unconditionally.  We get to fool around
>    with stubs, binaries carry more useless code, and introspection
>    becomes less useful.  Meh.

I think that 3 is the way to go. With a single-QEMU-executable
there are going to be lots and lots of cases where a QAPI
command needs to be present in the binary but won't be
applicable for the particular machine type / target architecture
currently being emulated. So "the commands always exist but they
might give you a suitable error if they're not relevant for
the config you're currently running" is more consistent.

Regarding introspection, doing it based on "we didn't put this
in at compile time" is going to give you inaccurate results:
even if a command was compiled in doesn't mean it's going to
be relevant to what you want to run.

-- PMM

Reply via email to