[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/12] rust: pl011: only leave embedded object initialization
From: |
Zhao Liu |
Subject: |
Re: [PATCH 07/12] rust: pl011: only leave embedded object initialization in instance_init |
Date: |
Thu, 26 Dec 2024 11:20:16 +0800 |
On Fri, Dec 20, 2024 at 03:29:49PM +0100, Paolo Bonzini wrote:
> Date: Fri, 20 Dec 2024 15:29:49 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH 07/12] rust: pl011: only leave embedded object
> initialization in instance_init
> X-Mailer: git-send-email 2.47.1
>
> Leave IRQ and MMIO initialization to instance_post_init. In Rust the
> two callbacks are more distinct, because only instance_post_init has a
> fully initialized object available.
>
> While at it, add a wrapper for sysbus_init_mmio so that accesses to
> the SysBusDevice correctly use shared references.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> rust/hw/char/pl011/src/device.rs | 18 ++++++++++--------
> rust/qemu-api/src/sysbus.rs | 12 ++++++++++++
> 2 files changed, 22 insertions(+), 8 deletions(-)
>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
- [PATCH 04/12] rust: macros: check that #[derive(Object)] requires #[repr(C)], (continued)
- [PATCH 04/12] rust: macros: check that #[derive(Object)] requires #[repr(C)], Paolo Bonzini, 2024/12/20
- [PATCH 01/12] rust: qom: add ParentField, Paolo Bonzini, 2024/12/20
- [PATCH 02/12] rust: add a utility module for compile-time type checks, Paolo Bonzini, 2024/12/20
- [PATCH 03/12] rust: macros: check that the first field of a #[derive(Object)] struct is a ParentField, Paolo Bonzini, 2024/12/20
- [PATCH 11/12] rust: qemu-api-macros: add automatic TryFrom/TryInto derivation, Paolo Bonzini, 2024/12/20
- [PATCH 07/12] rust: pl011: only leave embedded object initialization in instance_init, Paolo Bonzini, 2024/12/20
- Re: [PATCH 07/12] rust: pl011: only leave embedded object initialization in instance_init,
Zhao Liu <=
- [PATCH 09/12] rust: qdev: expose inherited methods to subclasses of SysBusDevice, Paolo Bonzini, 2024/12/20
- [PATCH 05/12] rust: qom: automatically use Drop trait to implement instance_finalize, Paolo Bonzini, 2024/12/20
- [PATCH 10/12] rust: qemu-api-macros: extend error reporting facility to parse errors, Paolo Bonzini, 2024/12/20
- [PATCH 06/12] rust: qom: move device_id to PL011 class side, Paolo Bonzini, 2024/12/20
- [PATCH 08/12] rust: qom: make INSTANCE_POST_INIT take a shared reference, Paolo Bonzini, 2024/12/20
- [PATCH 12/12] rust: hide warnings for subprojects, Paolo Bonzini, 2024/12/20