From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org
Subject: Re: [PATCH] rust: cell: add full example of declaring a SysBusDevice
Date: Tue, 4 Mar 2025 20:44:52 +0100 [thread overview]
Message-ID: <79ca1c7b-6196-41f8-a25e-154b13fc70cb@redhat.com> (raw)
In-Reply-To: <Z8cyhSfdeTufVzaj@intel.com>
On 3/4/25 18:04, Zhao Liu wrote:
>> +//! struct PL061Device {
>
> Maybe PL061State?
>
>> +//! parent_obj: ParentField<SysBusDevice>,
>> +//!
>> +//! // Configuration is read-only after initialization
>> +//! pullups: u32,
>> +//! pulldowns: u32,
>> +//!
>> +//! // Same for sub-objects of the device
>> +//! out: [Owned<IRQState>; N_GPIOS],
>
> Should this be InterruptSource type?
>
> Just have a quick look at pl061.c:
>
> qdev_init_gpio_out(dev, s->out, N_GPIOS);
>
> So in Rust side, `out` would be initialized by
> DeviceMethods::init_gpio_out().
>
>
> Others are fine for me ~ with above nits fixed,
>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Yes, all good points. Looks like we're set for 10.0 soft freeze. :)
Paolo
prev parent reply other threads:[~2025-03-04 19:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 8:55 [PATCH] rust: cell: add full example of declaring a SysBusDevice Paolo Bonzini
2025-03-04 17:04 ` Zhao Liu
2025-03-04 19:44 ` Paolo Bonzini [this message]
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=79ca1c7b-6196-41f8-a25e-154b13fc70cb@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
--cc=zhao1.liu@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).