On Wed, 1 Oct 2025 at 16:05, Philippe Mathieu-Daudé <[email protected]> wrote: > > Instead of using the convenient @CPUState::as shortcut, use > cpu_get_address_space(asidx=0) to get the vCPU first address > space. > > The goal is to reduce the risk of AS mis-use for targets > that uses multiple ASes per vCPU.
I'm not sure I agree with this. The cpu->as is handy for the large number of targets which only use one AddressSpace: which is everything except arm and x86 right now. 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. thanks -- PMM
