On Thu, 23 May 2024 at 20:44, Inès Varhol <ines.var...@telecom-paris.fr> wrote: > > Expose the clock period via the QOM 'qtest-clock-period' property so it > can be used in QTests. This property is only accessible in QTests (not > via HMP). > > Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> > Signed-off-by: Inès Varhol <ines.var...@telecom-paris.fr> > --- > docs/devel/clocks.rst | 3 +++ > hw/core/clock.c | 16 ++++++++++++++++ > 2 files changed, 19 insertions(+) > > diff --git a/docs/devel/clocks.rst b/docs/devel/clocks.rst > index 177ee1c90d..19e67601ec 100644 > --- a/docs/devel/clocks.rst > +++ b/docs/devel/clocks.rst > @@ -358,6 +358,9 @@ humans (for instance in debugging), use > ``clock_display_freq()``, > which returns a prettified string-representation, e.g. "33.3 MHz". > The caller must free the string with g_free() after use. > > +It's also possible to retrieve the clock period from a QTest by > +accessing QOM property ``qtest-clock-period`` using a QMP command.
We should add: This property is only present when the device is being run under the ``qtest`` accelerator; it is not available when QEMU is being run normally. thanks -- PMM