Hi,
On 1/10/25 18:42, Philippe Mathieu-Daudé wrote:
On 1/10/25 18:35, Richard Henderson wrote:
On 10/1/25 09:08, Peter Maydell wrote:
Targets that use multiple address spaces need to be careful
about which AS they use by definition. Unless we have a
track record of code in those targets carelessly using
cpu->as when it should do something else, I'm not sure
that there's a benefit that makes it worth making the
"use the one and only AS this CPU will ever have" more awkward.
I agree.
Moreover, '0' as a default is just as bad as cpu->as, because you're
giving no thought to the selection. Similarly using
MEMATTRS_UNSPECIFIED. When such things matter, we need the real
attributes and/or as piped down from the proper memory reference.
W.r.t MEMATTRS_UNSPECIFIED, is it better to have a legacy API using
it discreetly under the hood, or have it explicit by using the
recommended API without changing the default values?
To kill a legacy API such replacement is worthwhile IMHO,
otherwise the code stays in a limbo, we have issues with
developpers using different APIs / styles, etc. Also maintainers
are Cc'ed during conversion series, so they can suggest better
replacement for defaults such MEMATTRS_UNSPECIFIED.
Regards,
Phil.