On Mon, Dec 07, 2020 at 12:38:49PM -0500, Eduardo Habkost wrote:
On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote:
> There's no generic way to query current accel and its properties via QOM
> because there's no link between an accel and current machine.
>
> The change adds the link, i.e. if HVF is enabled the following will be
> available in QOM:
>
> (qemu) qom-get /machine/accel type
> "hvf-accel"
>
> Suggested-by: Markus Armbruster <armbru(a)redhat.com>
> Suggested-by: Paolo Bonzini <pbonzini(a)redhat.com>
> Signed-off-by: Roman Bolshakov <r.bolshakov(a)yadro.com>
> ---
>
> Hi,
>
> this is a follow up patch that deprecates earlier series [1].
>
Is there a reference to the reasoning for dropping the earlier
approach? Your previous approach seems preferable.
Okay I wasn't sure about that :) It's clear now from your and Daniel's
response that a documented QMP method is preferable for public API.
but we need a commit message that doesn't make people think the
`qom-get` command above will always work.
How about the one below:
accel: Wire accel to /machine
An accel is a property of a machine but it's not reflected in QOM. An
ownership between machine and accel is also not expressed.
The change adds the link, i.e. if HVF is enabled the following will be
available in QOM:
(qemu) qom-get /machine/accel type
"hvf-accel"
Note that management applications shouldn't rely on the type as it may
change in future at QEMU's discretion.
---
Regards,
Roman