> > { > > if (s->flags & HF_IOBPT_MASK) { > > +#ifdef CONFIG_USER_ONLY > > + /* user-mode cpu should not be in IOBPT mode */ > > + g_assert_not_reached(); > > +#else > > TCGv_i32 t_size = tcg_const_i32(1 << ot); > > TCGv t_next = tcg_const_tl(s->pc - s->cs_base); > > > > gen_helper_bpt_io(cpu_env, t_port, t_size, t_next); > > tcg_temp_free_i32(t_size); > > tcg_temp_free(t_next); > > +#endif /* CONFIG_USER_ONLY */ > > } > > } > > Just highlighting this for your convenience Paolo, > as I am just flailing in the dark here looking for similar patterns. > > Is it the case that we should never be in the HF_IOBPT mode when building for > CONFIG_USER_ONLY ?
Yes, pretty much. Maybe worth adding a qemu_assert_softmmu() (return true for softmmu, abort for user-only), like if ((s->flags & HF_IOBPT_MASK) && qemu_assert_softmmu()) { } Slightly weird API, maybe, but something along those lines. Paolo