mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
Implement helper accessors as methods of HPETRegisters. Then HPETRegisters can be accessed without going through HPETState. In subsequent refactoring, coarser-grained BQL lock protection will be implemented. Specifically, BqlRefCell<HPETRegisters> will be borrowed only once during MMIO accesses, and the scope of borrowed `regs` will be extended to cover the entire MMIO access. Consequently, repeated borrow() attempts within function calls will no longer be allowed. Therefore, refactor the accessors of HPETRegisters to bypass HPETState, which help to reduce borrow() in deep function calls. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20251113051937.4017675-14-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>