Files
qemu-qemu/rust
Zhao Liu d25964880f rust/hpet: Pass &BqlRefCell<HPETRegisters> as argument during MMIO access
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>
2025-12-27 10:11:10 +01:00
..
2025-12-27 10:11:10 +01:00
2025-12-27 10:11:09 +01:00
2025-12-27 10:11:10 +01:00
2025-12-27 10:11:10 +01:00
2025-12-27 10:11:10 +01:00
2025-12-27 10:11:09 +01:00
2025-12-27 10:11:10 +01:00
2024-11-05 14:18:15 +01:00