On Sat, 16 Nov 2024 at 20:24, Paolo Bonzini <pbonz...@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