[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1] rust/pl011: Fix DeviceID reads
From: |
Peter Maydell |
Subject: |
Re: [PATCH v1] rust/pl011: Fix DeviceID reads |
Date: |
Sat, 16 Nov 2024 21:21:19 +0000 |
On Sat, 16 Nov 2024 at 20:24, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 11/16/24 19:15, Manos Pitsidianakis wrote:
> > match RegisterOffset::try_from(offset) {
> > + Ok(PeriphID0) | Ok(PeriphID1) | Ok(PeriphID2) | Ok(PeriphID3)
> > | Ok(PCellID0)
> > + | Ok(PCellID1) | Ok(PCellID2) | Ok(PCellID3) => {
> > + // Ignore writes to read-only registers.
> > + }
>
> This is indeed an improvement over the patches that Junjie and I had
> sent, because the writes would have gone down the eprintln! path.
In our C implementations of devices we usually let writes
to read-only registers end up in the same default case
as writes to invalid offsets, because they're all
guest errors that we'd like to log. That's what the C pl011
model does.
-- PMM