qemu-devel
[Top][All Lists]
Advanced

[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: Peter Maydell
Subject: Re: [PATCH v6 1/3] memory: drop guest writes to read-only ram device regions
Date: Tue, 26 May 2020 10:14:03 +0100

On Tue, 26 May 2020 at 03:21, Yan Zhao <address@hidden> wrote:
> so which regions should keep ops->write and which regions should not?

Devices which never need to return a transaction failure
and which never care about transaction attributes can
continue to use ops->write (this is most devices).
It's only if you actually need to be able to say "that
transaction failed" or you need to look at the attributes
that you have to implement write_with_attrs -- there
are a lot fewer of these.

(You could argue for a refactoring where we drop the
old ->read and ->write methods on devices and then
rename read_with_attrs and write_with_attrs to read
and write, but unless we can manage to do it entirely
automatedly it seems like too much effort to me.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]