On 12/5/24 07:07, Zhao Liu wrote:
Implement QAPI support for HPET device in qdev.rs.

Additionally, wrap the handling of HPET internal details as traits to be
specifically implemented in hpet.rs.

Why not just put everything in a simple file to avoid the traits?

+pub(crate) trait RamOps {
+    fn read(&mut self, addr: hwaddr, _size: c_uint) -> u64;
+    fn write(&mut self, addr: hwaddr, value: u64, size: u64);
+}

Please try as much as possible to make these "&self", same for the GPIO handler. That's the point of BqlCell/BqlRefCell. :)

Paolo


Reply via email to