On 26/04/2018 17:09, Peter Maydell wrote:
>
> QUESTIONS:
> * do we really need to postpone things from
> memory_region_invalidate_mmio_ptr() to
> memory_region_do_invalidate_mmio_ptr(), given that the deletion of
> the memory region and ramblock is RCU-deferred anyway?
> * should we add the subregion at elevated prio so it definitely hits
> first? I've left it the way the existing code does for the
> moment...
> * is there any way to avoid the weird self-owning MemoryRegion
> and corresponding need to pass a NULL name pointer?
There would be, but the comment here says why it'd be an issue:
/* Memory regions without an owner are supposed to never go away;
* we do not ref/unref them because it slows down DMA sensibly.
*/
if (mr && mr->owner) {
object_ref(mr->owner);
}
though perhaps we can remove that other hack in 2.13, which will have
MemoryRegionCache again.
Paolo