From a6765c04beac0a3e20032b619df6afbc70b6ef74 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 8 Sep 2025 12:49:47 +0200 Subject: rust: move Cell vmstate impl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will allow to split vmstate to a standalone crate next. Signed-off-by: Marc-André Lureau Link: https://lore.kernel.org/r/20250827104147.717203-10-marcandre.lureau@redhat.com Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/cell.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rust/qemu-api/src/cell.rs') diff --git a/rust/qemu-api/src/cell.rs b/rust/qemu-api/src/cell.rs index 148a13e3f5..9943d7286b 100644 --- a/rust/qemu-api/src/cell.rs +++ b/rust/qemu-api/src/cell.rs @@ -221,7 +221,7 @@ use std::{ ptr::NonNull, }; -use crate::bindings; +use crate::{bindings, impl_vmstate_transparent}; /// An internal function that is used by doctests. pub fn bql_start_test() { @@ -456,6 +456,8 @@ impl BqlCell { } } +impl_vmstate_transparent!(crate::cell::BqlCell where T: VMState); + /// A mutable memory location with dynamically checked borrow rules, /// protected by the Big QEMU Lock. /// @@ -764,6 +766,8 @@ impl From for BqlRefCell { } } +impl_vmstate_transparent!(crate::cell::BqlRefCell where T: VMState); + struct BorrowRef<'b> { borrow: &'b Cell, } -- cgit 1.4.1