From: Zhao Liu <zhao1.liu@intel.com>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Mads Ynddal" <mads@ynddal.dk>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
rowan.hart@intel.com,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-arm@nongnu.org
Subject: Re: [RFC PATCH v3 5/5] DO NOT MERGE: replace TYPE_PL011 with x-pl011-rust in arm virt machine
Date: Wed, 26 Jun 2024 00:18:55 +0800 [thread overview]
Message-ID: <Znrt77XOc2YBNZyM@intel.com> (raw)
In-Reply-To: <229703c7f4394691f254b02c012ee0d7dcf57afb.1718827153.git.manos.pitsidianakis@linaro.org>
Hi Manos,
On Wed, Jun 19, 2024 at 11:14:02PM +0300, Manos Pitsidianakis wrote:
> Date: Wed, 19 Jun 2024 23:14:02 +0300
> From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> Subject: [RFC PATCH v3 5/5] DO NOT MERGE: replace TYPE_PL011 with
> x-pl011-rust in arm virt machine
> X-Mailer: git-send-email 2.44.0
>
> Convenience patch for testing the rust device.
>
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
> hw/arm/virt.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 3c93c0c0a6..f33b58ae0d 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -912,7 +912,11 @@ static void create_uart(const VirtMachineState *vms, int uart,
> int irq = vms->irqmap[uart];
> const char compat[] = "arm,pl011\0arm,primecell";
> const char clocknames[] = "uartclk\0apb_pclk";
> +#ifdef CONFIG_WITH_RUST
> + DeviceState *dev = qdev_new("x-pl011-rust");
> +#else
> DeviceState *dev = qdev_new(TYPE_PL011);
> +#endif
> SysBusDevice *s = SYS_BUS_DEVICE(dev);
> MachineState *ms = MACHINE(vms);
>
I realized that if we want to merge the rust pl011 device, then this
patch or similar enablement support is necessary, otherwise, the rust
code is only used for compilation and cannot actually be run...
This is also an open for the devices that are rewrite in Rust.
I think there should be an option for the user to choose whether to
enable pl011 in C or pl011 in Rust. What do you think?
Perhaps the easiest way to enable rust pl011 is to add an option for
virt machine... But that's certainly not a long-term approach. I think
the ideal way would be to allow rust pl011 to be specified in the
command line via -device, but this approach would mean allowing the
user to create pl011 and would require changes to the current buildin
pl011's creation logic.
-Zhao
next prev parent reply other threads:[~2024-06-25 16:04 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 20:13 [RFC PATCH v3 0/5] Implement ARM PL011 in Rust Manos Pitsidianakis
2024-06-19 20:13 ` [RFC PATCH v3 1/5] build-sys: Add rust feature option Manos Pitsidianakis
2024-06-20 13:21 ` Paolo Bonzini
2024-06-20 18:06 ` Manos Pitsidianakis
2024-06-20 19:44 ` Paolo Bonzini
2024-06-24 8:51 ` Zhao Liu
2024-06-24 16:35 ` Paolo Bonzini
2024-06-20 13:41 ` Alex Bennée
2024-06-20 18:14 ` Manos Pitsidianakis
2024-06-24 16:52 ` Daniel P. Berrangé
2024-06-24 17:14 ` Paolo Bonzini
2024-06-25 21:47 ` Manos Pitsidianakis
2024-06-26 9:34 ` Paolo Bonzini
2024-07-02 14:38 ` Manos Pitsidianakis
2024-07-02 15:23 ` Paolo Bonzini
2024-06-19 20:13 ` [RFC PATCH v3 2/5] rust: add bindgen step as a meson dependency Manos Pitsidianakis
2024-06-20 11:10 ` Alex Bennée
2024-06-20 12:34 ` Paolo Bonzini
2024-06-20 18:18 ` Manos Pitsidianakis
2024-06-20 12:32 ` Alex Bennée
2024-06-20 18:22 ` Manos Pitsidianakis
2024-06-24 19:52 ` Stefan Hajnoczi
2024-06-20 14:01 ` Richard Henderson
2024-06-20 18:36 ` Manos Pitsidianakis
2024-06-20 19:30 ` Richard Henderson
2024-06-24 10:12 ` Zhao Liu
2024-06-24 10:02 ` Manos Pitsidianakis
2024-06-25 16:00 ` Zhao Liu
2024-06-25 18:08 ` Manos Pitsidianakis
2024-06-27 23:47 ` Pierrick Bouvier
2024-06-28 19:12 ` Pierrick Bouvier
2024-06-28 21:50 ` Paolo Bonzini
2024-07-01 18:53 ` Pierrick Bouvier
2024-06-29 8:06 ` Manos Pitsidianakis
2024-07-01 18:54 ` Pierrick Bouvier
2024-07-02 12:25 ` Manos Pitsidianakis
2024-07-02 16:07 ` Pierrick Bouvier
2024-06-19 20:14 ` [RFC PATCH v3 3/5] rust: add PL011 device model Manos Pitsidianakis
2024-06-19 20:14 ` [RFC PATCH v3 4/5] DO NOT MERGE: add rustdoc build for gitlab pages Manos Pitsidianakis
2024-06-19 20:14 ` [RFC PATCH v3 5/5] DO NOT MERGE: replace TYPE_PL011 with x-pl011-rust in arm virt machine Manos Pitsidianakis
2024-06-25 16:18 ` Zhao Liu [this message]
2024-06-25 18:23 ` Manos Pitsidianakis
2024-06-25 19:15 ` Daniel P. Berrangé
2024-06-25 20:43 ` Peter Maydell
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=Znrt77XOc2YBNZyM@intel.com \
--to=zhao1.liu@intel.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=gustavo.romero@linaro.org \
--cc=mads@ynddal.dk \
--cc=manos.pitsidianakis@linaro.org \
--cc=marcandre.lureau@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rowan.hart@intel.com \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.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).