All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 1/3] rust/memory: replace size arg with Bits enum
Date: Tue, 8 Jul 2025 16:42:55 +0800	[thread overview]
Message-ID: <aGzaD5RM6qPYlkSQ@intel.com> (raw)
In-Reply-To: <20250703-rust-mem-api-v1-1-cd5314bdf580@linaro.org>

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.pitsidianakis@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.pitsidianakis@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.liu@intel.com>



  parent reply	other threads:[~2025-07-08 21:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03 13:58 [PATCH 0/3] Small Rust memory API improvements Manos Pitsidianakis
2025-07-03 13:58 ` [PATCH 1/3] rust/memory: replace size arg with Bits enum Manos Pitsidianakis
2025-07-08  8:19   ` Zhao Liu
2025-07-08  8:35   ` Paolo Bonzini
2025-07-08  9:11     ` Manos Pitsidianakis
2025-07-08 12:25       ` Paolo Bonzini
2025-07-08  8:42   ` Zhao Liu [this message]
2025-07-03 13:58 ` [PATCH 2/3] memattrs.h: make MemTxAttrs into enum Manos Pitsidianakis
2025-07-03 15:42   ` Philippe Mathieu-Daudé
2025-07-08  8:22   ` Zhao Liu
2025-07-08  8:43   ` Zhao Liu
2025-07-03 13:58 ` [PATCH 3/3] rust: add *_with_attrs methods to MemoryRegionOps Manos Pitsidianakis
2025-07-08  8:42   ` Zhao Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aGzaD5RM6qPYlkSQ@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.