On 09/11/2015 11:54, Peter Maydell wrote: > > current_cpu is available here, so it should be possible to have only one > > io_mem_watch per CPU address space index (i.e. two). > > So the opaque gives you the asidx and then you look at current_cpu's > cpu_ases[asidx]? Yeah, that works and is simpler. (Good argument for > making "number of ASes per CPU" a compile-time constant I guess.)
Yes. Of course it works well only if the compile-time constant is small---but again, my guess is that it'll be two. It would be even better if you can use the attrs instead of the opaque to compute the asidx. Then the only change you need is to watch_mem_*. Paolo