[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 1/3] memory: drop guest writes to read-only ram device reg
From: |
Yan Zhao |
Subject: |
Re: [PATCH v6 1/3] memory: drop guest writes to read-only ram device regions |
Date: |
Thu, 28 May 2020 00:35:29 -0400 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Tue, May 26, 2020 at 10:26:35AM +0100, Peter Maydell wrote:
> On Mon, 25 May 2020 at 11:20, Paolo Bonzini <pbonzini@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.)
>
then should I just drop the writes to read-only ram-device regions and
vfio regions without returning MEMTX_ERROR?
do you think it's good?
Thanks
Yan