On Thu, Jul 03, 2025 at 04:58:11PM +0300, Manos Pitsidianakis wrote: > Date: Thu, 03 Jul 2025 16:58:11 +0300 > From: Manos Pitsidianakis <manos.pitsidiana...@linaro.org> > Subject: [PATCH 1/3] rust/memory: replace size arg with Bits enum > X-Mailer: b4 0.14.2 > > We have the ability to make memory accesses use a typesafe access width > type in Rust, which the C API currently lacks as it does not use a > newtype wrapper for specifying the amount of bytes a memory access has; > it uses a plain 32-bit integer value instead. > > Replace use of u32 size arguments with a Bits enum that has only the > allowed byte sizes as variants and has a u32 representation so that it > can be fed back into C as well. > > Signed-off-by: Manos Pitsidianakis <manos.pitsidiana...@linaro.org> > --- > rust/hw/char/pl011/src/device.rs | 8 ++++---- > rust/hw/timer/hpet/src/device.rs | 14 +++++++------- > rust/qemu-api/src/memory.rs | 34 ++++++++++++++++++++++++---------- > 3 files changed, 35 insertions(+), 21 deletions(-)
LGTM, Reviewed-by: Zhao Liu <zhao1....@intel.com>