From: Paolo Bonzini <pbonzini@redhat.com>
To: Bernhard Beschow <shentey@gmail.com>, qemu-devel@nongnu.org
Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
qemu-rust@nongnu.org
Subject: Re: [PATCH v2 2/2] rust/hw/char/pl011/src/device: Implement logging
Date: Wed, 11 Jun 2025 09:55:20 +0200 [thread overview]
Message-ID: <fc9689e4-f48c-4174-be02-9091338bfa1d@redhat.com> (raw)
In-Reply-To: <20250610202110.2243-3-shentey@gmail.com>
On 6/10/25 22:21, Bernhard Beschow wrote:
> Now that there is logging support in Rust for QEMU, use it in the pl011
> device.
Adding also this to match the C code:
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs
index 42dfa9509dc..e505abfae86 100644
--- a/rust/hw/char/pl011/src/device.rs
+++ b/rust/hw/char/pl011/src/device.rs
@@ -305,6 +305,12 @@ fn read_data_register(&mut self, update: &mut bool) -> u32 {
}
fn write_data_register(&mut self, value: u32) -> bool {
+ if !self.control.enable_uart() {
+ log_mask!(Log::GuestError, "PL011 data written to disabled UART\n");
+ }
+ if !self.control.enable_transmit() {
+ log_mask!(Log::GuestError, "PL011 data written to disabled TX UART\n");
+ }
// interrupts always checked
let _ = self.loopback_tx(value.into());
self.int_level |= Interrupt::TX;
next prev parent reply other threads:[~2025-06-11 7:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 20:21 [PATCH v2 0/2] Initial logging support for Rust Bernhard Beschow
2025-06-10 20:21 ` [PATCH v2 1/2] rust/qemu-api: Add initial logging support based on C API Bernhard Beschow
2025-06-11 7:56 ` Paolo Bonzini
2025-06-11 10:19 ` Bernhard Beschow
2025-06-11 10:44 ` Paolo Bonzini
2025-06-11 10:57 ` Manos Pitsidianakis
2025-06-11 11:05 ` Paolo Bonzini
2025-06-11 12:17 ` Manos Pitsidianakis
2025-06-12 7:29 ` Bernhard Beschow
2025-06-12 7:37 ` Bernhard Beschow
2025-06-12 7:39 ` Paolo Bonzini
2025-06-10 20:21 ` [PATCH v2 2/2] rust/hw/char/pl011/src/device: Implement logging Bernhard Beschow
2025-06-11 7:55 ` Paolo Bonzini [this message]
2025-06-11 10:20 ` Bernhard Beschow
2025-06-11 11:01 ` Manos Pitsidianakis
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=fc9689e4-f48c-4174-be02-9091338bfa1d@redhat.com \
--to=pbonzini@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
--cc=shentey@gmail.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).