From patchwork Mon May 9 11:58:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 570989 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:66c4:0:0:0:0 with SMTP id x4csp3947203mal; Mon, 9 May 2022 05:30:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFyhr+qPHb7AAVWdtf90zBN0PX5gPtwEOYqRN0CWpxWAUC7W1YwBB2fkUfZXAenw1q357z X-Received: by 2002:a05:620a:666:b0:69f:bbd4:b9af with SMTP id a6-20020a05620a066600b0069fbbd4b9afmr11161511qkh.11.1652099444213; Mon, 09 May 2022 05:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652099444; cv=none; d=google.com; s=arc-20160816; b=WS1EjdvQ3RRhtGI4l77zOlE0DhI2TWEz7aR2gnD2CJqkDenkLRxKol8L4vZayRWg0f j1qfa9IXaIpjUMiWc77JvHpJB940tLgZSHXaFIqiRf910NK46YwNjIK4316lLCzKfVrR LoUs+CMWOouS5fyknsMzgbroiFHAoflqZyueENMs/mK768/7TO8OJvY2VbxUgiRE0clq 9oBggtKgbXufFMUQQBhiWrmTVSAQyqQg0VvF1CgEIpocL0TFtZraqdosNwtNp4b36u/a xIvrVwVZCYSq+Rk1LpvnpbvRQNLL25Q3norLq8vzxSvj8Bd/9ZXjy+psra7fDJz+y4lb 8sMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CHxjayFyhr5I4QGmzb4c6k5c4ekfbOJ2eilTAyumfL8=; b=BDkydmz8cwAHGX5r1eh1bVO+vhiG3c/Ky41HCxJ0TsQiE7PW1xsJDc5JVMRvRxTgfO VTSU6sGM0ulZyewDPv5p/S7Z0oBK4sWc1YY/X1xrDa6KyLiW/cgv+DY7xvHyFjupxo+i 3MSV7NfWAkPJRrZVI8tu2e0UwknY/AcrI6dM+c46wF7h/sD0wjnbqT/FbW700YImmSsy ywJQYEv4zQn4d6DZflvNlF/sydDVD/Lmt4BW1YJzxm/ZkCy1LIs97u+amPx1rWsdxYAM v8s8g69slJNBtsYQVH0yfLEyxpEaMrODTz3urCv8GQfyqLXRy8Q+QkfP9Uw7dMtlJ1W3 d+pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yi1lT6Ka; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v2-20020a05622a144200b002f35aeef1f3si8098346qtx.397.2022.05.09.05.30.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 May 2022 05:30:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yi1lT6Ka; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1no2XD-0000xD-Qe for patch@linaro.org; Mon, 09 May 2022 08:30:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1no22k-0007tu-EH for qemu-devel@nongnu.org; Mon, 09 May 2022 07:59:14 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:38682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1no22i-0001LV-Or for qemu-devel@nongnu.org; Mon, 09 May 2022 07:59:14 -0400 Received: by mail-wm1-x335.google.com with SMTP id 1-20020a05600c248100b00393fbf11a05so10617420wms.3 for ; Mon, 09 May 2022 04:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CHxjayFyhr5I4QGmzb4c6k5c4ekfbOJ2eilTAyumfL8=; b=Yi1lT6KanPpBoe+NsJfg70qRGUAcu0QBBSI1m4uXpJUX0f6qsCaNB4P0lKf/Ou8QCP yTf0a5qUPuZapQEIG2SGgNacAqIzV0w6GyttKxFYsdS8P9P2zWWLpehYAqUJvDvvj15H cSxDEFVBPmM0zyioddmjxE9S+cQpU3P8Ck1UywjpqQ2Yfe79GAkHquHLnGd0zp4iB5nD 0WlLU6N31lK9vuoq7NDjQIm3cpKM2ZtmPPQfbLkiAUenFxcjZTg+cL9gA5MwEmI/qbll KXcHi/9AWbOhg8E+KfBrf10Gwxvuf5ek8ULUQsQXr2aaSi+Bl1rwSMlUahBnv3qRIJ75 cArw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CHxjayFyhr5I4QGmzb4c6k5c4ekfbOJ2eilTAyumfL8=; b=540PjjfgpErE66kXBajHeRaSqVE2w+/5f/0rGsbv19qQB/seCy+iu0Oev1YmcOSpqc I4drnaCEYhzhOcBifYCwsnQ8ykSmPC/JL8KDFZakOL0zD24K6Mt50JF6HcvyjavDzvDq BEFzHbWhQDJ/1wF+C2kV33Roq76yW8cqRr1NSE+1x1/wCoU2pmV1DLRStXTH92Eo3ndi Vb5V254Ltwl68OTGxzJGFI690cryVntrEWqAB5Rr9tuztkR1xOuhKMPQYixjgLEdXNZO ISKU2jVH5fBouuv6C3KZftnw6g3w07q824KLoVKTm/if8DvwYlR2Zf+eTKU5lsndgCuu o67w== X-Gm-Message-State: AOAM532zH8Ts2cPOcLGtaQgS9VTYeOZXNIw34IjyQUNhIpunHnhlawcJ 1M8XJp/XMOB3SzhQNpPMXUTsf5xvUcewYQ== X-Received: by 2002:a05:600c:6005:b0:394:7ba4:5e62 with SMTP id az5-20020a05600c600500b003947ba45e62mr14997828wmb.25.1652097551512; Mon, 09 May 2022 04:59:11 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bs6-20020a056000070600b0020c5253d8bdsm12199928wrb.9.2022.05.09.04.59.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 04:59:11 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 26/32] hw/arm: add versioning to sbsa-ref machine DT Date: Mon, 9 May 2022 12:58:42 +0100 Message-Id: <20220509115848.3521805-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220509115848.3521805-1-peter.maydell@linaro.org> References: <20220509115848.3521805-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Leif Lindholm The sbsa-ref machine is continuously evolving. Some of the changes we want to make in the near future, to align with real components (e.g. the GIC-700), will break compatibility for existing firmware. Introduce two new properties to the DT generated on machine generation: - machine-version-major To be incremented when a platform change makes the machine incompatible with existing firmware. - machine-version-minor To be incremented when functionality is added to the machine without causing incompatibility with existing firmware. to be reset to 0 when machine-version-major is incremented. This versioning scheme is *neither*: - A QEMU versioned machine type; a given version of QEMU will emulate a given version of the platform. - A reflection of level of SBSA (now SystemReady SR) support provided. The version will increment on guest-visible functional changes only, akin to a revision ID register found on a physical platform. These properties are both introduced with the value 0. (Hence, a machine where the DT is lacking these nodes is equivalent to version 0.0.) Signed-off-by: Leif Lindholm Message-id: 20220505113947.75714-1-quic_llindhol@quicinc.com Cc: Peter Maydell Cc: Radoslaw Biernacki Cc: Cédric Le Goater Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/sbsa-ref.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index dac8860f2d0..4bb444684f4 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -192,6 +192,20 @@ static void create_fdt(SBSAMachineState *sms) qemu_fdt_setprop_cell(fdt, "/", "#address-cells", 0x2); qemu_fdt_setprop_cell(fdt, "/", "#size-cells", 0x2); + /* + * This versioning scheme is for informing platform fw only. It is neither: + * - A QEMU versioned machine type; a given version of QEMU will emulate + * a given version of the platform. + * - A reflection of level of SBSA (now SystemReady SR) support provided. + * + * machine-version-major: updated when changes breaking fw compatibility + * are introduced. + * machine-version-minor: updated when features are added that don't break + * fw compatibility. + */ + qemu_fdt_setprop_cell(fdt, "/", "machine-version-major", 0); + qemu_fdt_setprop_cell(fdt, "/", "machine-version-minor", 0); + if (ms->numa_state->have_numa_distance) { int size = nb_numa_nodes * nb_numa_nodes * 3 * sizeof(uint32_t); uint32_t *matrix = g_malloc0(size);