On 7/1/25 16:55, Zhao Liu wrote:
On Mon, Jan 06, 2025 at 04:21:16PM +0100, Paolo Bonzini wrote:
Date: Mon, 6 Jan 2025 16:21:16 +0100
From: Paolo Bonzini <pbonz...@redhat.com>
Subject: Re: [PULL 25/41] rust: qom: put class_init together from multiple
ClassInitImpl<>
Il lun 6 gen 2025, 14:32 Peter Maydell <peter.mayd...@linaro.org> ha
scritto:
I think here I agree with Philippe that we might as well
provide only the new API to Rust devices.
Ok, I wasn't thinking of doing that because there isn't right now an easy
way to add interfaces to Rust-defined classes. However, all devices are
Resettable and Device isn't defined in Rust, so it's not hard to add a
ResettableImpl trait in rust/qemu-api/srv/qdev.rs, and initialize it for
all devices.
If anybody wants to do it as an exercise, I am happy to help, otherwise I
can prepare a patch too.
If possible and if no one else wants to practice, I would also like to
give it a try (I'll add it to my list).
Go ahead! (I'm very busy right now)
Thanks :)