mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
Currently in HPETTimer context, the global registers are accessed by dereferring a HPETState raw pointer stored in NonNull<>, and then borrowing the BqlRefCel<>. This blocks borrowing HPETRegisters once during MMIO access, and furthermore prevents replacing BqlRefCell<> with Mutex<>. Therefore, do not access global registers through NonNull<HPETState> and instead passing &BqlRefCell<HPETRegisters> as argument in function calls within MMIO access. But there's one special case that is timer handler, which still needs to access HPETRegistsers through NonNull<HPETState>. It's okay for now since this case doesn't have any repeated borrow() or lock reentrancy issues. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20251113051937.4017675-17-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>