All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Claudio Fontana <cfontana@suse.de>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [RFC v19 10/15] i386: move TCG btp_helper into softmmu/
Date: Tue, 16 Feb 2021 18:36:02 +0100	[thread overview]
Message-ID: <CABgObfYxzZ2h9+z8YnbVOKc6irVirE7JODz92ANJ7XYt2pROTw@mail.gmail.com> (raw)
In-Reply-To: <633d0100-73aa-7129-e636-31174140ac62@suse.de>

> >  {
> >      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



  reply	other threads:[~2021-02-16 17:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 10:46 [RFC v19 00/15] i386 cleanup PART 2 Claudio Fontana
2021-02-16 10:46 ` [RFC v19 01/15] i386: split cpu accelerators from cpu.c, using AccelCPUClass Claudio Fontana
2021-02-16 10:46 ` [RFC v19 02/15] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn Claudio Fontana
2021-02-16 10:46 ` [RFC v19 03/15] accel: introduce new accessor functions Claudio Fontana
2021-02-16 10:46 ` [RFC v19 04/15] target/i386: fix host_cpu_adjust_phys_bits error handling Claudio Fontana
2021-02-16 10:46 ` [RFC v19 05/15] accel-cpu: make cpu_realizefn return a bool Claudio Fontana
2021-02-16 10:46 ` [RFC v19 06/15] meson: add target_user_arch Claudio Fontana
2021-02-16 10:46 ` [RFC v19 07/15] i386: split off softmmu-only functionality in tcg-cpu Claudio Fontana
2021-02-16 10:46 ` [RFC v19 08/15] i386: split smm helper (softmmu) Claudio Fontana
2021-02-16 10:46 ` [RFC v19 09/15] i386: split tcg excp_helper into softmmu and user parts Claudio Fontana
2021-02-16 10:46 ` [RFC v19 10/15] i386: move TCG btp_helper into softmmu/ Claudio Fontana
2021-02-16 11:58   ` Claudio Fontana
2021-02-16 17:36     ` Paolo Bonzini [this message]
2021-02-16 10:46 ` [RFC v19 11/15] i386: split misc helper into user and softmmu parts Claudio Fontana
2021-02-16 10:46 ` [RFC v19 12/15] i386: separate fpu_helper " Claudio Fontana
2021-02-16 10:46 ` [RFC v19 13/15] i386: slit svm_helper into softmmu and stub-only user Claudio Fontana
2021-02-16 10:52   ` Claudio Fontana
2021-02-16 10:58     ` Paolo Bonzini
2021-02-16 10:58   ` Paolo Bonzini
2021-02-16 19:34   ` Eric Blake
2021-02-16 20:44     ` Claudio Fontana
2021-02-16 10:46 ` [RFC v19 14/15] i386: split seg_helper into user-only and softmmu parts Claudio Fontana
2021-02-16 10:46 ` [RFC v19 15/15] i386: split off softmmu part of cpu.c Claudio Fontana
2021-02-16 11:06 ` [RFC v19 00/15] i386 cleanup PART 2 no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABgObfYxzZ2h9+z8YnbVOKc6irVirE7JODz92ANJ7XYt2pROTw@mail.gmail.com \
    --to=pbonzini@redhat.com \
    --cc=cfontana@suse.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.