rust: pl011: Add missing logging to match C version

Co-developed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Link: https://lore.kernel.org/r/20250615112037.11992-4-shentey@gmail.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Bernhard Beschow 2025-06-15 13:20:36 +02:00 committed by Paolo Bonzini
parent 1563f287dc
commit b783601d1a

View file

@ -305,6 +305,12 @@ impl PL011Registers {
}
fn write_data_register(&mut self, value: u32) -> bool {
if !self.control.enable_uart() {
log_mask_ln!(Log::GuestError, "PL011 data written to disabled UART");
}
if !self.control.enable_transmit() {
log_mask_ln!(Log::GuestError, "PL011 data written to disabled TX UART");
}
// interrupts always checked
let _ = self.loopback_tx(value.into());
self.int_level |= Interrupt::TX;