From nobody Tue Nov 26 19:41:47 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=1705992034; cv=none; d=zohomail.com; s=zohoarc; b=fJfZnJi81LCHQKKEMVrwJfqLms+KmrXx98ZoUnOnc9+3CG00HdgBsI06AXJqXcD8r/Soon55XPg8QWdAcuaSRbL7dAoqtjDSU/w6+tsDGSyfA0UJdszMA5FJ/we0Dm26GIr1VDruiUAe64BgJYy+P620sSNO1LB7TMw/wsjCb+Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705992034; 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=m9RsXwkIiR7u8iZiK9ZGN009LrDVwcev6tzF2NgB1Qwl9hU1G1qtqPikFukXBtBx3NdGHrryqoCaUFC4eBn2eXjBQ/qfK1n5F3QiekRaFa/3/6LER8uhiY0J4nB9T03+mHnb5aCAnnACPWGECG8X6/T8pw8QhoIUlkiIni6vaFE= 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 1705992034088216.06073972620607; Mon, 22 Jan 2024 22:40:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSARL-0003kB-IS; Tue, 23 Jan 2024 01:39:19 -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 1rSARA-0003Xg-Ew for qemu-devel@nongnu.org; Tue, 23 Jan 2024 01:39:12 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSAR6-00084v-Sa for qemu-devel@nongnu.org; Tue, 23 Jan 2024 01:39:06 -0500 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a26ed1e05c7so433118466b.2 for ; Mon, 22 Jan 2024 22:39:04 -0800 (PST) Received: from m1x-phil.lan ([176.187.194.78]) by smtp.gmail.com with ESMTPSA id z19-20020a170906271300b00a2ae0aa9002sm14101678ejc.40.2024.01.22.22.39.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 22 Jan 2024 22:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705991943; x=1706596743; 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=bUtvC4xtbaL2Z5BRd/WvRIMcbQdHCbcbdut6pEPkXQhjVttlsfAdN9HACh5f96SLc/ Bb9d9pL6TRMs3PeUpZngTNxbz9QSWlE3mQZumdfqI+Y98+KwZ4FSi6tmsTUe9TAwt7Kd E6//oY7dkAK5OIaUaehWOaasXPzeT1JMB7aQ8zY8yrTRDGUf74nYav4bJifP8LzhPeRX DNOKblEF9g7tUPn2a90gcn/97C1GEcW+sIXQCftAnFxbSSVXdxJV1XsfMODf8ZoVIebM xMnnLDWC7oiaH7cTTBDyhCUBJdavBQ1oUXi+3t3/9gD1ig65q/CL1Dsi8UoGG2E0FfIb G00g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705991943; x=1706596743; 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=fWudRwvK6W9ixZgQj9kegYhIwLL3Wa5UVIgpW6Vl9cM8f31AJXFOeGuxZTq6y7+JKL 2ex7K7le2orLikQ5OgK6Y/GHDNbUEqopePfj5u5Z0A/lbB08BD6HaHEo014dzcgLoYxL v7kTrxSMOqDCfw8qQevJAPPPc7IsANwhPqoOX0Xp3a7CfPLSNAwoTUqVfwl5WElkjYZs ppAEHAONcCVQE2i3VO27J2/mRUuoepcJR/fCN9W3uAU0T2Ht3o/VQtqqPnQ2lgTp0Ojh 4JtLzWIUkkgyBa8YSyjJ5q8IYPdPbUrqUhKw4VAP+fWNGcIWR9fVFI0IUEcrIxSYc5C4 9n4g== X-Gm-Message-State: AOJu0YxqirAqifCjG7GKcnXNQ3V3Hp5gdL5itKan/IlzL3YTJkWu0R07 uf3tJ6v1uNkyYusWAV1g1iseX2xLvgSU7ByF6Xt5YGLUUdsRgAo2oRGuNWKOq+KJBnUB4gi9c/I O/WE= X-Google-Smtp-Source: AGHT+IH8CEEAWEge+Yj9AnKTu/LhfRV72ETCYupaXb457vSHypXsgUtlGf72o8VzPe0PZO2AAndrgg== X-Received: by 2002:a17:906:ba83:b0:a30:d603:5ed0 with SMTP id cu3-20020a170906ba8300b00a30d6035ed0mr34022ejd.144.1705991943341; Mon, 22 Jan 2024 22:39:03 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Igor Mammedov , Alistair Francis , Gavin Shan , Andrew Jeffery , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-arm@nongnu.org, Igor Mitsyanko , Joel Stanley , "Edgar E. Iglesias" , Rob Herring , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/8] hw/arm/vexpress: Check for CPU types in machine_run_board_init() Date: Tue, 23 Jan 2024 07:38:37 +0100 Message-ID: <20240123063842.35255-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240123063842.35255-1-philmd@linaro.org> References: <20240123063842.35255-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::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.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=unavailable 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: 1705992035697100003 Restrict MachineClass::valid_cpu_types[] to the single valid CPU types. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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