qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Leif Lindholm <leif@nuviainc.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Shashi Mallela <shashi.mallela@linaro.org>,
	Radoslaw Biernacki <rad@semihalf.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	narmstrong@baylibre.com, Eric Auger <eric.auger@redhat.com>,
	qemu-arm <qemu-arm@nongnu.org>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC
Date: Thu, 2 Sep 2021 13:42:58 +0100	[thread overview]
Message-ID: <20210902124258.mqjhx7lqqvkczf6a@leviathan> (raw)
In-Reply-To: <CAFEAcA9WVu+kjfCWwfGQV00yKgmdFDCSUpxNOu1BEBM3AZCWXg@mail.gmail.com>

Hi Peter,

On Thu, Aug 19, 2021 at 14:27:19 +0100, Peter Maydell wrote:
> On Thu, 12 Aug 2021 at 17:53, Shashi Mallela <shashi.mallela@linaro.org> wrote:
> >
> > Included creation of ITS as part of SBSA platform GIC
> > initialization.
> >
> > Signed-off-by: Shashi Mallela <shashi.mallela@linaro.org>
> > ---
> >  hw/arm/sbsa-ref.c | 79 ++++++++++++++++++++++++++++++++++++++++++++---
> >  1 file changed, 75 insertions(+), 4 deletions(-)
> >
> 
> > +static char *sbsa_get_version(Object *obj, Error **errp)
> > +{
> > +    SBSAMachineState *sms = SBSA_MACHINE(obj);
> > +
> > +    switch (sms->version) {
> > +    case SBSA_DEFAULT:
> > +        return g_strdup("default");
> > +    case SBSA_ITS:
> > +        return g_strdup("sbsaits");
> > +    default:
> > +        g_assert_not_reached();
> > +    }
> > +}
> > +
> > +static void sbsa_set_version(Object *obj, const char *value, Error **errp)
> > +{
> > +    SBSAMachineState *sms = SBSA_MACHINE(obj);
> > +
> > +    if (!strcmp(value, "sbsaits")) {
> > +        sms->version = SBSA_ITS;
> > +    } else if (!strcmp(value, "default")) {
> > +        sms->version = SBSA_DEFAULT;
> > +    } else {
> > +        error_setg(errp, "Invalid version value");
> > +        error_append_hint(errp, "Valid values are default, sbsaits.\n");
> > +    }
> > +}
> >
> >  static void sbsa_ref_instance_init(Object *obj)
> >  {
> >      SBSAMachineState *sms = SBSA_MACHINE(obj);
> >
> > +    sms->version = SBSA_ITS;
> >      sbsa_flash_create(sms);
> >  }
> >
> > @@ -850,6 +915,12 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
> >      mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
> >      mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
> >      mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;
> > +
> > +    object_class_property_add_str(oc, "version", sbsa_get_version,
> > +                                  sbsa_set_version);
> > +    object_class_property_set_description(oc, "version",
> > +                                          "Set the Version type. "
> > +                                          "Valid values are default & sbsaits");
> 
> This doesn't look right; where has it come from ?
> 
> If you want a command line switch to let the user say whether the
> ITS should be present or not, you should use the same thing the
> virt board does, which is a bool property "its".
> 
> If you want the sbsa-ref board to become a proper "versioned machine
> type" such that users can say "-M sbsa-ref-6.1" and get the SBSA
> board exactly as QEMU 6.1 supplied it, that looks completely different
> (and is a heavy back-compatibility burden, so needs discussion about
> whether now is the right time to do it), and probably is better not
> tangled up with this patchseries.

Hmm. I mean, you're absolutely right about the complexity and need for
discussion. My concern is that we cannot insert the ITS block in the
memory map where it would be in an ARM GIC implementation without
changing the memory map (pushing the redistributor further down).

It is also true that simply versioning sbsa-ref does not mean we end
up with a properly aligned with ARM IP register frame layout. Some
additional logic is required for that.

If we assume that we don't want to further complicate this set by
adding the additional logic *now*, I see three options:
- Implement memory map versioning for sbsa-ref for this set, placing
  the ITS (if enabled) directly after the DIST for sbsa-ref-6.2.
- In this set, place the ITS frames in a different location relative
  to the REDIST frames than it will end up once the further logic is
  implemented.
- Drop the sbsa-ref ITS support from this set, and bring it in with
  the set implementing the additional logic.

Typing that, I'm getting the feeling that if I was the maintainer,
the third option would be my preference...

/
    Leif


  parent reply	other threads:[~2021-09-02 12:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 16:53 [PATCH v8 00/10] GICv3 LPI and ITS feature implementation Shashi Mallela
2021-08-12 16:53 ` [PATCH v8 01/10] hw/intc: GICv3 ITS initial framework Shashi Mallela
2021-08-12 16:53 ` [PATCH v8 02/10] hw/intc: GICv3 ITS register definitions added Shashi Mallela
2021-08-12 16:53 ` [PATCH v8 03/10] hw/intc: GICv3 ITS command queue framework Shashi Mallela
2021-08-12 16:53 ` [PATCH v8 04/10] hw/intc: GICv3 ITS Command processing Shashi Mallela
2021-08-13  7:51   ` Neil Armstrong
2021-08-12 16:53 ` [PATCH v8 05/10] hw/intc: GICv3 ITS Feature enablement Shashi Mallela
2021-08-12 16:53 ` [PATCH v8 06/10] hw/intc: GICv3 redistributor ITS processing Shashi Mallela
2021-08-19 13:21   ` Peter Maydell
2021-08-12 16:53 ` [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC Shashi Mallela
2021-08-19 13:27   ` Peter Maydell
2021-08-23 15:05     ` shashi.mallela
2021-09-02 12:42     ` Leif Lindholm [this message]
2021-09-02 12:51       ` Peter Maydell
2021-09-03 12:01         ` Leif Lindholm
2021-09-03 12:09           ` Peter Maydell
2021-09-23 16:00       ` Peter Maydell
2021-10-15 12:23         ` Leif Lindholm
2021-11-09 13:43           ` Peter Maydell
2021-11-09 20:42             ` Leif Lindholm
2021-11-09 21:21               ` Peter Maydell
2021-11-09 22:52                 ` Leif Lindholm
2021-11-11 16:55                   ` Peter Maydell
2021-11-11 18:21                     ` Leif Lindholm
2021-08-12 16:53 ` [PATCH v8 08/10] tests/data/acpi/virt: Add IORT files for ITS Shashi Mallela
2021-08-19 13:21   ` Peter Maydell
2021-08-12 16:53 ` [PATCH v8 09/10] hw/arm/virt: add ITS support in virt GIC Shashi Mallela
2021-08-12 16:53 ` [PATCH v8 10/10] tests/data/acpi/virt: Update IORT files for ITS Shashi Mallela
2021-08-19 13:22   ` Peter Maydell

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=20210902124258.mqjhx7lqqvkczf6a@leviathan \
    --to=leif@nuviainc.com \
    --cc=eric.auger@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=narmstrong@baylibre.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rad@semihalf.com \
    --cc=shashi.mallela@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).