[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v19 10/15] i386: move TCG btp_helper into softmmu/
From: |
Paolo Bonzini |
Subject: |
Re: [RFC v19 10/15] i386: move TCG btp_helper into softmmu/ |
Date: |
Tue, 16 Feb 2021 18:36:02 +0100 |
> > {
> > 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
- [RFC v19 02/15] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn, (continued)
- [RFC v19 02/15] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn, Claudio Fontana, 2021/02/16
- [RFC v19 04/15] target/i386: fix host_cpu_adjust_phys_bits error handling, Claudio Fontana, 2021/02/16
- [RFC v19 01/15] i386: split cpu accelerators from cpu.c, using AccelCPUClass, Claudio Fontana, 2021/02/16
- [RFC v19 08/15] i386: split smm helper (softmmu), Claudio Fontana, 2021/02/16
- [RFC v19 03/15] accel: introduce new accessor functions, Claudio Fontana, 2021/02/16
- [RFC v19 07/15] i386: split off softmmu-only functionality in tcg-cpu, Claudio Fontana, 2021/02/16
- [RFC v19 05/15] accel-cpu: make cpu_realizefn return a bool, Claudio Fontana, 2021/02/16
- [RFC v19 06/15] meson: add target_user_arch, Claudio Fontana, 2021/02/16
- [RFC v19 10/15] i386: move TCG btp_helper into softmmu/, Claudio Fontana, 2021/02/16
- [RFC v19 09/15] i386: split tcg excp_helper into softmmu and user parts, Claudio Fontana, 2021/02/16
- [RFC v19 12/15] i386: separate fpu_helper into user and softmmu parts, Claudio Fontana, 2021/02/16
- [RFC v19 13/15] i386: slit svm_helper into softmmu and stub-only user, Claudio Fontana, 2021/02/16
- [RFC v19 14/15] i386: split seg_helper into user-only and softmmu parts, Claudio Fontana, 2021/02/16
- [RFC v19 15/15] i386: split off softmmu part of cpu.c, Claudio Fontana, 2021/02/16