[PATCH 33/33] rust: do not inline do_init_io

Paolo Bonzini posted 33 patches 2 weeks, 6 days ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
[PATCH 33/33] rust: do not inline do_init_io
Posted by Paolo Bonzini 2 weeks, 6 days ago
This is now possible since the hwcore integration tests do not
link the system crate anymore.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 rust/system/src/memory.rs | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/rust/system/src/memory.rs b/rust/system/src/memory.rs
index 02aa3af7b13..4b3316bf767 100644
--- a/rust/system/src/memory.rs
+++ b/rust/system/src/memory.rs
@@ -136,11 +136,6 @@ unsafe impl Send for MemoryRegion {}
 unsafe impl Sync for MemoryRegion {}
 
 impl MemoryRegion {
-    // inline to ensure that it is not included in tests, which only
-    // link to hwcore and qom.  FIXME: inlining is actually the opposite
-    // of what we want, since this is the type-erased version of the
-    // init_io function below.  Look into splitting the qemu_api crate.
-    #[inline(always)]
     unsafe fn do_init_io(
         slot: *mut bindings::MemoryRegion,
         owner: *mut bindings::Object,
-- 
2.51.0
Re: [PATCH 33/33] rust: do not inline do_init_io
Posted by Zhao Liu 2 weeks, 2 days ago
On Mon, Sep 08, 2025 at 12:50:05PM +0200, Paolo Bonzini wrote:
> Date: Mon,  8 Sep 2025 12:50:05 +0200
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH 33/33] rust: do not inline do_init_io
> X-Mailer: git-send-email 2.51.0
> 
> This is now possible since the hwcore integration tests do not
> link the system crate anymore.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  rust/system/src/memory.rs | 5 -----
>  1 file changed, 5 deletions(-)

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