On Thu, 28 Mar 2019 at 19:14, Richard Henderson <richard.hender...@linaro.org> wrote: > > On 3/28/19 7:30 AM, Peter Maydell wrote: > > - void *hostaddr[maxidx]; > > + void *hostaddr[DIV_ROUND_UP(2 * KiB, 1 << TARGET_PAGE_BITS_MIN)]; > > A very fancy way of writing "2".
Yes, but I thought this made the relationship between the constant size and what maxidx a little clearer. > > > int try, i; > > unsigned mmu_idx = cpu_mmu_index(env, false); > > TCGMemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); > > > > + assert(maxidx <= sizeof(hostaddr)); > > ARRAY_SIZE(hostaddr). Oops, yes. thanks -- PMM