On Mon, 25 May 2020 at 11:20, Paolo Bonzini <pbonz...@redhat.com> wrote: > Not all of them, only those that need to return MEMTX_ERROR. I would > like some guidance from Peter as to whether (or when) reads from ROMs > should return MEMTX_ERROR. This way, we can use that information to > device what the read-only ram-device regions should do.
In general I think writes to ROMs (and indeed reads from ROMs) should not return MEMTX_ERROR. I think that in real hardware you could have a ROM that behaved either way; so our default behaviour should probably be to do what we've always done and not report a MEMTX_ERROR. (If we needed to I suppose we should implement a MEMTX_ERROR-reporting ROM, but to be honest there aren't really many real ROMs in systems these days: it's more often flash, whose response to writes is defined by the spec and is I think to ignore writes which aren't the magic "shift to program-the-flash-mode" sequence.) thanks -- PMM