[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] rust/hw/char/pl011/src/device: Implement logging
From: |
Bernhard Beschow |
Subject: |
Re: [PATCH v2 2/2] rust/hw/char/pl011/src/device: Implement logging |
Date: |
Wed, 11 Jun 2025 10:20:17 +0000 |
Am 11. Juni 2025 07:55:20 UTC schrieb Paolo Bonzini <pbonzini@redhat.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;
>
Will add as separate patch in v3.
Best regards,
Bernhard
- Re: [PATCH v2 1/2] rust/qemu-api: Add initial logging support based on C API, (continued)
Re: [PATCH v2 1/2] rust/qemu-api: Add initial logging support based on C API, Manos Pitsidianakis, 2025/06/11
- Re: [PATCH v2 1/2] rust/qemu-api: Add initial logging support based on C API, Paolo Bonzini, 2025/06/11
- Re: [PATCH v2 1/2] rust/qemu-api: Add initial logging support based on C API, Manos Pitsidianakis, 2025/06/11
- Re: [PATCH v2 1/2] rust/qemu-api: Add initial logging support based on C API, Bernhard Beschow, 2025/06/12
- Re: [PATCH v2 1/2] rust/qemu-api: Add initial logging support based on C API, Bernhard Beschow, 2025/06/12
- Re: [PATCH v2 1/2] rust/qemu-api: Add initial logging support based on C API, Paolo Bonzini, 2025/06/12
[PATCH v2 2/2] rust/hw/char/pl011/src/device: Implement logging, Bernhard Beschow, 2025/06/10