On Fri, Aug 22, 2025 at 02:26:49PM +0200, Paolo Bonzini wrote:
> Date: Fri, 22 Aug 2025 14:26:49 +0200
> From: Paolo Bonzini <[email protected]>
> Subject: [PATCH 08/14] rust: qdev: add minimal clock bindings
> X-Mailer: git-send-email 2.50.1
>
> Add the minimal support that is needed by pl011's event and tracepoint.
>
> Signed-off-by: Paolo Bonzini <[email protected]>
> ---
> rust/qemu-api/src/qdev.rs | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
...
> + pub const fn get(&self) -> u64 {
get() sounds too general for Clock obj...maybe get_period()?
> + // SAFETY: Clock is returned by init_clock_in with zero value for
> period
> + unsafe { &*self.0.as_ptr() }.period
> + }
Otherwise,
Reviewed-by: Zhao Liu <[email protected]>