From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12D2BC4338F for ; Thu, 19 Aug 2021 13:29:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CEE316113D for ; Thu, 19 Aug 2021 13:29:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CEE316113D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:38290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGi6m-0004cg-RI for qemu-devel@archiver.kernel.org; Thu, 19 Aug 2021 09:29:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGi5Y-0003OW-Ls for qemu-devel@nongnu.org; Thu, 19 Aug 2021 09:28:10 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:39900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGi5X-0002Ek-1D for qemu-devel@nongnu.org; Thu, 19 Aug 2021 09:28:08 -0400 Received: by mail-ed1-x52b.google.com with SMTP id cn28so8882144edb.6 for ; Thu, 19 Aug 2021 06:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=byfOvag5+5Wjtyv1JqsS31vAuP/a2Iq4KlJVIZBKMOw=; b=cjWeLE4VFPbNSeNj861zjd6kixSvGADx1wqCPBcmMDZ1j/X5TZ/3xs04Hwg9yKxNqV I8FIHwPvxWZ066rJo4ycU7oV8ESpgPebBkKS055/H130jJfiX/0305b/qXg1GpqRcatT APNNkVvWung/m9xhUuzrtentge9knDLA/l9nR5UVxk8W0o3/0OQrzCBEnjJ9EcUDw9dG vgPv0AJhO3Ui88KSSCVOUXZOsoIlBMo9joHQF1GnKpIhw7Rk/QEtr8304wcfvrhmYMsA DN2BZX2S+RvjUaYu5HfLZlXtoYjGAZVZTx88fjEQ4gcoiASUBDLowoJejtehJw7xpybL jjvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=byfOvag5+5Wjtyv1JqsS31vAuP/a2Iq4KlJVIZBKMOw=; b=Gky2+tPG3fm0xj3YRtWOifjztznvGObqKwZnC7/B7u1aaSsFlUDTGQf3CyIdzlRG9z PMxkagQtEpIeqoRTb1NDc4J33jl/BvvCtvuDe0pPuTMjEG3Ur2xP5V+axMQUNw5+6Z9m LjzGYIGe3pz7jmY9VhGuH8lwukHZOq0vBQkKNckRlSwxBJxWY2icqdFpQ2z3AXowXoO4 euwh7XWRDUZy2zH/KAEa2i3PVj/sQYD4CNQy1VSRulSal1prRb5wcqHRNCMQMOyFJmcF PdjoUcb+NC2IwfVy8kOku9dwc+IxjPurBA3W+zaCH5yRIl+Mnxll5LOECfX799K1LaH1 RKUw== X-Gm-Message-State: AOAM531EDO/8IZ020bKMkaQ9sFoccBV3nXDSv/ngYsCU/Ibr6R9tEwJ2 R3rBhyW1Yv9oe3YIzYFv3+2O4MQrnlqALnpGopyjGA== X-Google-Smtp-Source: ABdhPJy5BrfS7R5WzHg99VJ7OlR8759yc8/HM3zop1SYoIDKNyJsHs7H1nEv78lgUdgwZrJNoS8MzST5nyF/ijz8QwA= X-Received: by 2002:a05:6402:3099:: with SMTP id de25mr16283113edb.36.1629379685438; Thu, 19 Aug 2021 06:28:05 -0700 (PDT) MIME-Version: 1.0 References: <20210812165341.40784-1-shashi.mallela@linaro.org> <20210812165341.40784-8-shashi.mallela@linaro.org> In-Reply-To: <20210812165341.40784-8-shashi.mallela@linaro.org> From: Peter Maydell Date: Thu, 19 Aug 2021 14:27:19 +0100 Message-ID: Subject: Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC To: Shashi Mallela Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=peter.maydell@linaro.org; helo=mail-ed1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Radoslaw Biernacki , QEMU Developers , narmstrong@baylibre.com, Eric Auger , qemu-arm , Igor Mammedov , Leif Lindholm Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, 12 Aug 2021 at 17:53, Shashi Mallela wrote: > > Included creation of ITS as part of SBSA platform GIC > initialization. > > Signed-off-by: Shashi Mallela > --- > 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. thanks -- PMM