From nobody Tue Nov 26 18:28:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706048783; cv=none; d=zohomail.com; s=zohoarc; b=hAOmByDUjlJHywzqVYnlPNnW3krysOH2zgpAwt11E/CtRLGe9d4HRXPU52yL2zCYr5OhC5hh+Ocpmq5Ggt3DQJpbGKsMDnNLKcRqswtWaav5ZSLfdViHBoXwnJLUuezcmIGdJoXMDyOgvx52IiS2PkNk/4YRXTQMkuCtCAVUstI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706048783; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2RjX1tFrRGVlM1BwnlKhE6JoLvLjIml7FEvFQ9cMoCw=; b=DycR6u/LfpkQmVUzNIz+tbRDZlIhsKIcnnJUmHTunfrvDMcL6r/DyXbozvHlalk7pUnN8tYvGk1Nuj6u7ogchB9MWEdJ4PT1uTQq+oz/1jXnQMYewbMB9IT+urszx4LiJV0ttXF1c2oF2zJsGjUImJPd701j5vuTajF1l9g+SZU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706048783828749.5346155388144; Tue, 23 Jan 2024 14:26:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSPDH-0005qK-0c; Tue, 23 Jan 2024 17:25:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSPDF-0005hr-2U for qemu-devel@nongnu.org; Tue, 23 Jan 2024 17:25:45 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSPDC-0000zJ-RW for qemu-devel@nongnu.org; Tue, 23 Jan 2024 17:25:44 -0500 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a293f2280c7so501945666b.1 for ; Tue, 23 Jan 2024 14:25:42 -0800 (PST) Received: from m1x-phil.lan ([176.187.194.78]) by smtp.gmail.com with ESMTPSA id x1-20020a1709064bc100b00a2c70caccbasm14539348ejv.107.2024.01.23.14.25.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 Jan 2024 14:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706048741; x=1706653541; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2RjX1tFrRGVlM1BwnlKhE6JoLvLjIml7FEvFQ9cMoCw=; b=TUc19tHZjyl4FfUjXYKcFb56jSJO7LiGv+PpiXnYJ3C3ywjCMi5rBdmJ0lOv0TBpEE 0KOfNhBgAfzuDI9yH/iPHhSm3jONaFEEoBH2RTH1SJFT809eGdYJhbnefSyFDEBjdXZV 9EJxyWEZs5D5O/fyfspUAU6ZkRvh94mXFw6Z+gb4hm7im67XIbk9fUnQeT8J02Doq7it vtH/DMx4d2FCHcfrRMru30iBpR1E7Fu3bfL1XusCEiWyxuAwwzevvpp9OzDwton2+ox3 LrIFrJ9y5KNCk0yPirt0XH5+51bWGglt7aRd9hRgp/eSVLnAa5Xa3GZ9x48Qi3MZi5QV xNHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706048741; x=1706653541; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2RjX1tFrRGVlM1BwnlKhE6JoLvLjIml7FEvFQ9cMoCw=; b=TLvQs2UnsV4X7iv8V/Xx65CW9KZHAv2vhzo17lrIkYDmrvPFKkWyTYCFVh8ayxw11/ DVApECUNG6laSSixlbbDAdv3f9AlwoWq23GLth3gMMMEd2y0BERmwEbOKUYGTDgpcXq8 mrlPSXxKpWLIqAd9e/YRtQQgFws0VDs82rmbXnnGJrx7N8T4IPVJkegIfkOkrTvPJ0lG rM2VzDlUKAy6yqM6fS0ibHRsagk83xNMnuSy+akDB9JBPeqZqVO2kntO671x9mpoxmut nNpL3Ua4vzYbB4nrpzyje+ws4hM0OwqdEBj0CIIWs8Fug4eRXhKlq9x2oDa+pXeSWuTG qeow== X-Gm-Message-State: AOJu0YzB58oMMwx9p2QGF3CCWQnk9BSaaoOcWO2Tr2iyUPOO4HYfhF07 PaXCrrBYU6cmWMySWYFwEcLLxt3bv0cjLo9MlNMCp/lUcsJx9dlxIr3fyJEIRFmqeyFLB63wkVH Z X-Google-Smtp-Source: AGHT+IEn7r3h75w6vm5m2TAgM5ELIUQ8bWkNZJV5XfU7Zfak1rjJUR8WqEwWgcm3AKP0Mqb7/K/hCQ== X-Received: by 2002:a17:907:8749:b0:a31:408:e4e5 with SMTP id qo9-20020a170907874900b00a310408e4e5mr146355ejc.178.1706048741114; Tue, 23 Jan 2024 14:25:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, Igor Mitsyanko , Rob Herring , Joel Stanley , "Edgar E. Iglesias" , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Andrew Jeffery , Gavin Shan , Alistair Francis , Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 5/6] hw/arm/vexpress: Check for CPU types in machine_run_board_init() Date: Tue, 23 Jan 2024 23:25:07 +0100 Message-ID: <20240123222508.13826-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240123222508.13826-1-philmd@linaro.org> References: <20240123222508.13826-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706048784948100001 Restrict MachineClass::valid_cpu_types[] to the single valid CPU types. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Gavin Shan Reviewed-by: Richard Henderson --- hw/arm/vexpress.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index f1b45245d5..a3561a1b56 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -783,22 +783,32 @@ static void vexpress_class_init(ObjectClass *oc, void= *data) =20 static void vexpress_a9_class_init(ObjectClass *oc, void *data) { + static const char * const valid_cpu_types[] =3D { + ARM_CPU_TYPE_NAME("cortex-a9"), + NULL + }; MachineClass *mc =3D MACHINE_CLASS(oc); VexpressMachineClass *vmc =3D VEXPRESS_MACHINE_CLASS(oc); =20 mc->desc =3D "ARM Versatile Express for Cortex-A9"; mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-a9"); + mc->valid_cpu_types =3D valid_cpu_types; =20 vmc->daughterboard =3D &a9_daughterboard; } =20 static void vexpress_a15_class_init(ObjectClass *oc, void *data) { + static const char * const valid_cpu_types[] =3D { + ARM_CPU_TYPE_NAME("cortex-a15"), + NULL + }; MachineClass *mc =3D MACHINE_CLASS(oc); VexpressMachineClass *vmc =3D VEXPRESS_MACHINE_CLASS(oc); =20 mc->desc =3D "ARM Versatile Express for Cortex-A15"; mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-a15"); + mc->valid_cpu_types =3D valid_cpu_types; =20 vmc->daughterboard =3D &a15_daughterboard; =20 --=20 2.41.0