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=-15.1 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,USER_AGENT_SANE_2 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 174E2C4338F for ; Mon, 23 Aug 2021 15:07:32 +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 7DA5761371 for ; Mon, 23 Aug 2021 15:07:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7DA5761371 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]:41326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIBXu-0005mv-MK for qemu-devel@archiver.kernel.org; Mon, 23 Aug 2021 11:07:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIBWK-0003gZ-1S for qemu-devel@nongnu.org; Mon, 23 Aug 2021 11:05:52 -0400 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]:38567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIBWF-0000dt-DK for qemu-devel@nongnu.org; Mon, 23 Aug 2021 11:05:51 -0400 Received: by mail-qk1-x732.google.com with SMTP id f22so9826747qkm.5 for ; Mon, 23 Aug 2021 08:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yued7Oy/qelzIR/xWh4LWJOlS8BORQ94XxLRXXxxqSY=; b=dq9bvnI1b1OyWdvZZm5K1FUIibCLosC9I4dHtiNaht5fZ02YKONoq6Dha/bGmlZFVA ayfk1Kvg6NzdDN1ZMmQ6RB7jdTlpvgZTTGcGct4uG0W0T6j5MbbJ3ujo2fIKr8Ys+Y6L vz9qLox5SKCqlAN/ObXV8BFKanLWJ7QBUSSXXwsb0S8mMIXKXVHxTh9wcMmGjPD2KqgI 5tcu4iWjQpEdyxk9KHd3Vn/VKiXgLFySdEc4gvXzzd4vPfO2yV982KeHlokfJjLKm9Ds x6hNkEdbL7Lh8pDbaoz1XRm76STZcvbRSqH5RbA5frjXh1X9NIIRO4wYyFEwruehLaeG 7F6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=Yued7Oy/qelzIR/xWh4LWJOlS8BORQ94XxLRXXxxqSY=; b=RizMFJayrQCp3KnxJ5c2kgbti2rETZ+Y26H4Ku6rVrTuiCaUY70nrDDpdiDfkNn8YB KOWRcrLFfAMvdcps+p3eHq8HL7yjXfyBhXQ/P3I1YIOJtPAK7YrChLurw2kBo7pO0B4S 1OViDV5zflAGDCGFj1PadVBWv6QNNm70DNc/eX+YPoTfoKM0yrZbxXH2Y7UOujXPfXPr 8oo61y/IEkqmy03pgzoeqeI5dkQRKkuig9tWfwf6cU3RuGKvJzqT16ZqV2lboGm5A+Qn 2Cm5bamX4TBgDBOEYmajccDjr8QId+NbTgQzvZ1/HOyae5A+cgBm12Ttc8binLkI2NdI gShA== X-Gm-Message-State: AOAM530nPPBmGk2eu3ZFHTnYywagJh+1SbuNR7StsLBIY7J/vQJp0DEK bB8LAPmC4LOdIZg2ettuGcsE5A== X-Google-Smtp-Source: ABdhPJwBYxQAJeO3zLVbLnPsU6sdc1ER0TAd4nBxAiSR8FoMcMtSdIQzf0eP7vEd0ILchkOD+liIoA== X-Received: by 2002:a37:506:: with SMTP id 6mr21647287qkf.15.1629731145294; Mon, 23 Aug 2021 08:05:45 -0700 (PDT) Received: from localhost.localdomain (bras-base-stsvon1503w-grc-22-142-114-143-47.dsl.bell.ca. [142.114.143.47]) by smtp.gmail.com with ESMTPSA id p187sm8689041qkd.101.2021.08.23.08.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 08:05:44 -0700 (PDT) Message-ID: <79931b6db53a9a92e0e0d80270ccb1284f881dff.camel@linaro.org> Subject: Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC From: shashi.mallela@linaro.org To: Peter Maydell Date: Mon, 23 Aug 2021 11:05:43 -0400 In-Reply-To: References: <20210812165341.40784-1-shashi.mallela@linaro.org> <20210812165341.40784-8-shashi.mallela@linaro.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-16.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::732; envelope-from=shashi.mallela@linaro.org; helo=mail-qk1-x732.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, 2021-08-19 at 14:27 +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 > > --- > > 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 Since the memory map for sbsa-ref has been updated with ITS address range added between distributor and redistributor regions(as per last reveiw comments),this has resulted in a change in the redistributor base address(as compared to previous sbsa-ref with no ITS support).Hence there was a subsequent request for creating a versioning logic to differentiate between ITS presence or absence which would be of use to other modules (like TF-A) to pick the relevant redistributor base address based on this versioning.