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
..
bits rust: remove unnecessary repetitive options 2025-12-27 10:11:09 +01:00
bql rust/bql: Ensure BQL locked early at BqlRefCell borrowing 2025-12-27 10:11:10 +01:00
chardev bql: add prelude 2025-12-27 10:11:10 +01:00
common common: add prelude 2025-12-27 10:11:09 +01:00
hw rust/hpet: Pass &BqlRefCell<HPETRegisters> as argument during MMIO access 2025-12-27 10:11:10 +01:00
migration rust/migration: Check name field in VMStateDescriptionBuilder 2025-12-27 10:11:10 +01:00
qemu-macros rust: remove unnecessary repetitive options 2025-12-27 10:11:09 +01:00
qom qom: add more to the prelude 2025-12-27 10:11:10 +01:00
system system: add prelude 2025-12-27 10:11:10 +01:00
tests bql: add prelude 2025-12-27 10:11:10 +01:00
trace rust: remove unnecessary repetitive options 2025-12-27 10:11:09 +01:00
util util: add prelude 2025-12-27 10:11:09 +01:00
.gitignore rust: add bindgen step as a meson dependency 2024-10-11 12:32:17 +02:00
Cargo.lock rust/hpet: add trace events 2025-12-27 10:11:10 +01:00
Cargo.toml rust: only leave leaf crates as workspace members 2025-10-28 13:02:26 +01:00
Kconfig rust: add PL011 device model 2024-11-05 14:18:15 +01:00
meson.build rust: move VMState from bql to migration 2025-10-14 11:04:00 +02:00
rustfmt.toml rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00