On Tue, 18 Feb 2020 at 20:07, Philippe Mathieu-Daudé <phi...@redhat.com> wrote: > I don't understand well cpu_physical_memory*(). Aren't these obsolete? > They confuse me when using multi-core CPUs.
They sort of are, but there is no simple mechanical replacement for them -- you need to look at the individual use to see what address space it should really be using. For instance the cases in hw/dma/ probably would require the device to be updated to the new pattern where it takes a MemoryRegion defining what it should be doing DMA to, and then it can create an AddressSpace and use that with address_space_*. But that's a bunch of work on older devices which mostly people don't care very much about. In theory we could do a textual replacement of cpu_physical_memory* with address_space_rw(&address_space_memory,...) but that's usually not the right address space, so I'm not sure that churn is worthwhile. thanks -- PMM