All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org
Subject: Re: [PATCH 09/10] rust: bindings: add Sync markers to types referred to by MemoryRegionOps
Date: Mon, 27 Jan 2025 18:58:57 +0800	[thread overview]
Message-ID: <Z5dm8ehRtDo2TqHt@intel.com> (raw)
In-Reply-To: <20250117194003.1173231-10-pbonzini@redhat.com>

On Fri, Jan 17, 2025 at 08:40:02PM +0100, Paolo Bonzini wrote:
> Date: Fri, 17 Jan 2025 20:40:02 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH 09/10] rust: bindings: add Sync markers to types referred
>  to by MemoryRegionOps
> X-Mailer: git-send-email 2.47.1
> 
> This is needed for the MemoryRegionOps<T> to be declared as static;
> Rust requires static elements to be Sync.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  rust/qemu-api/src/bindings.rs | 19 ++++++++++++++++++-
>  rust/qemu-api/src/irq.rs      |  3 +++
>  2 files changed, 21 insertions(+), 1 deletion(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> diff --git a/rust/qemu-api/src/bindings.rs b/rust/qemu-api/src/bindings.rs
> index 8a9b821bb91..3f61264ab80 100644
> --- a/rust/qemu-api/src/bindings.rs
> +++ b/rust/qemu-api/src/bindings.rs
> @@ -21,7 +21,24 @@
>  #[cfg(not(MESON))]
>  include!(concat!(env!("OUT_DIR"), "/bindings.inc.rs"));
>  
> -unsafe impl Send for Property {}

I guess this is a rebase mistake since latest rust-next drops this
change :-).

> +// SAFETY: these are implemented in C; the bindings need to assert that the
> +// BQL is taken, either directly or via `BqlCell` and `BqlRefCell`.
> +unsafe impl Sync for BusState {}

We haven't used BusState but it's fine, as the basic support, and after
all bindings file has this type.




  reply	other threads:[~2025-01-27 10:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-17 19:39 [RFC PATCH 00/10] rust: remaining part of qdev bindings Paolo Bonzini
2025-01-17 19:39 ` [PATCH 01/10] rust: qemu-api: add sub-subclass to the integration tests Paolo Bonzini
2025-01-20 16:40   ` Zhao Liu
2025-01-17 19:39 ` [PATCH 02/10] rust: qom: add reference counting functionality Paolo Bonzini
2025-01-26 15:15   ` Zhao Liu
2025-01-29 10:03     ` Paolo Bonzini
2025-02-05  8:28       ` Zhao Liu
2025-01-27  7:57   ` Zhao Liu
2025-01-29 10:16     ` Paolo Bonzini
2025-02-05  9:13       ` Zhao Liu
2025-02-05  9:10         ` Paolo Bonzini
2025-02-05  9:40           ` Zhao Liu
2025-02-06  3:26   ` Zhao Liu
2025-01-17 19:39 ` [PATCH 03/10] rust: qom: add object creation functionality Paolo Bonzini
2025-02-06  7:49   ` Zhao Liu
2025-02-06  7:39     ` Paolo Bonzini
2025-01-17 19:39 ` [PATCH 04/10] rust: callbacks: allow passing optional callbacks as () Paolo Bonzini
2025-01-27  8:41   ` Zhao Liu
2025-01-17 19:39 ` [PATCH 05/10] rust: qdev: add clock creation Paolo Bonzini
2025-02-06  8:15   ` Zhao Liu
2025-01-17 19:39 ` [PATCH 06/10] rust: qom: allow initializing interface vtables Paolo Bonzini
2025-01-27 10:33   ` Zhao Liu
2025-01-17 19:40 ` [PATCH 07/10] rust: qdev: make ObjectImpl a supertrait of DeviceImpl Paolo Bonzini
2025-01-27  9:10   ` Zhao Liu
2025-02-06  8:37   ` Philippe Mathieu-Daudé
2025-01-17 19:40 ` [PATCH 08/10] rust: qdev: switch from legacy reset to Resettable Paolo Bonzini
2025-01-27 10:31   ` Zhao Liu
2025-01-27 18:01     ` Paolo Bonzini
2025-01-28  9:25       ` Zhao Liu
2025-02-06  8:31   ` Zhao Liu
2025-01-17 19:40 ` [PATCH 09/10] rust: bindings: add Sync markers to types referred to by MemoryRegionOps Paolo Bonzini
2025-01-27 10:58   ` Zhao Liu [this message]
2025-01-17 19:40 ` [PATCH 10/10] rust: bindings for MemoryRegionOps Paolo Bonzini
2025-01-27 12:12   ` Zhao Liu
2025-01-27 18:11     ` Paolo Bonzini
2025-02-06  9:15       ` Zhao Liu
2025-02-06  9:15         ` Paolo Bonzini
2025-02-06  8:39   ` Philippe Mathieu-Daudé
2025-02-06  8:46     ` Paolo Bonzini
2025-02-06 10:02       ` Philippe Mathieu-Daudé
2025-02-06 10:19         ` Paolo Bonzini
2025-02-10 10:38           ` Philippe Mathieu-Daudé
2025-01-24  2:46 ` [RFC PATCH 00/10] rust: remaining part of qdev bindings 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=Z5dm8ehRtDo2TqHt@intel.com \
    --to=zhao1.liu@intel.com \
    --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.