Re: [PATCH 09/10] rust/timer/hpet: add qom and qdev APIs support

2025-01-29 Thread Paolo Bonzini
On Sat, Jan 25, 2025 at 1:32 PM Zhao Liu wrote: fn read(&mut self, addr: hwaddr, _size: u32) -> u64 { This can be &self. let shift: u64 = (addr & 4) * 8; +match addr { +HPET_TN_CFG_REG => self.config >> shift, // including interrupt capabilities This

[PATCH 09/10] rust/timer/hpet: add qom and qdev APIs support

2025-01-25 Thread Zhao Liu
Implement QOM & QAPI support for HPET device. Signed-off-by: Zhao Liu --- Changes since RFC: * Merge qdev.rs to hpet.rs. * Apply memory and Resettable bindings. * Consolidate inmutable &self and QOM casting. * Prefer timer iterator over loop. * Move init_mmio() and init_irq() to post_init().