On Mon, Dec 09, 2024 at 01:37:15PM +0100, Paolo Bonzini wrote: > Date: Mon, 9 Dec 2024 13:37:15 +0100 > From: Paolo Bonzini <pbonz...@redhat.com> > Subject: [PATCH 24/26] rust: qom: move device_id to PL011 class side > X-Mailer: git-send-email 2.47.1 > > There is no need to monkeypatch DeviceId::Luminary into the > already-initialized > PL011State. Instead, now that we can define a class hierarchy, we can define > PL011Class and make device_id a field in there. > > There is also no need anymore to have "Arm" as zero, so change DeviceId into a > wrapper for the array; all it does is provide an Index<hwaddr> implementation > because arrays can only be indexed by usize. > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > rust/hw/char/pl011/src/device.rs | 59 +++++++++++++++----------------- > 1 file changed, 28 insertions(+), 31 deletions(-)
Reviewed-by: Zhao Liu <zhao1....@intel.com>