Re: [PATCH 07/10] rust: pl011: wrap registers with BqlRefCell

2025-01-23 Thread Paolo Bonzini
Il gio 23 gen 2025, 10:05 Zhao Liu ha scritto: > > I will double check. But I do see that there is no mut access inside, at > > least not until the qemu_chr_fe_accept_input() is moved here. > Unfortunately > > until all MemoryRegion and CharBackend bindings are available the uses of > > &mut and

Re: [PATCH 07/10] rust: pl011: wrap registers with BqlRefCell

2025-01-23 Thread Zhao Liu
> > > #[repr(C)] > > > -#[derive(Debug, qemu_api_macros::Object, qemu_api_macros::offsets)] > > > > This is the issue I also met, so why not drive "Debug" for BqlRefCell? > > > > Because it is not entirely possible to do it safely--there could be > outstanding borrows that break invariants and ca

Re: [PATCH 07/10] rust: pl011: wrap registers with BqlRefCell

2025-01-23 Thread Paolo Bonzini
Il gio 23 gen 2025, 06:27 Zhao Liu ha scritto: > On Fri, Jan 17, 2025 at 10:26:54AM +0100, Paolo Bonzini wrote: > > Date: Fri, 17 Jan 2025 10:26:54 +0100 > > From: Paolo Bonzini > > Subject: [PATCH 07/10] rust: pl011: wrap registers with BqlRefCell > > X-Ma

Re: [PATCH 07/10] rust: pl011: wrap registers with BqlRefCell

2025-01-22 Thread Zhao Liu
On Fri, Jan 17, 2025 at 10:26:54AM +0100, Paolo Bonzini wrote: > Date: Fri, 17 Jan 2025 10:26:54 +0100 > From: Paolo Bonzini > Subject: [PATCH 07/10] rust: pl011: wrap registers with BqlRefCell > X-Mailer: git-send-email 2.47.1 > > This is a step towards making memory ops use

[PATCH 07/10] rust: pl011: wrap registers with BqlRefCell

2025-01-17 Thread Paolo Bonzini
This is a step towards making memory ops use a shared reference to the device type; it's not yet possible due to the calls to character device functions. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 38 +- rust/hw/char/pl011/src/device_class.r