From nobody Tue Nov 26 22:24:38 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=1704469467; cv=none; d=zohomail.com; s=zohoarc; b=UFDRJHaXqwKbGZvxL5QMigrPtRDXwsFKyGVl6WecS/CY6eKCU0dH3XGbZgQln3ng7R0othUZhdauxTugQkUbT3Dj01lAZfUJeWExNpS8PM7SgANFTpgJiOfThIczViGjWYS4x0goTX3pzSM6POpI0JtwrVMQ8K9KiTTTX6EqIQI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704469467; 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=ZrhO0fF/4wCYRBDkij/JpNIZFZJdEux3joJ/5vLZ4GY=; b=hmpZRDRtlUp0zswj3GFt9/2jctquPXIj7TFWIzVeeVfq0qgWhSABq4PjUXdW3shdiqnfPFxJma1Ty2gAweVLHI6YyokIfOgTgi66OSmAB92pqs36qPHAIkm6B2c5v9Qx3SuUuKOPYanvHrtHvnfCf0LaKAcEd5X4b/+gNNgTgKQ= 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 1704469467637399.3543495525382; Fri, 5 Jan 2024 07:44:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLmM6-0004QK-UT; Fri, 05 Jan 2024 10:43:30 -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 1rLmM1-0004Id-Ii for qemu-devel@nongnu.org; Fri, 05 Jan 2024 10:43:27 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLmLz-0002zA-8y for qemu-devel@nongnu.org; Fri, 05 Jan 2024 10:43:24 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40d5ac76667so12842245e9.1 for ; Fri, 05 Jan 2024 07:43:22 -0800 (PST) Received: from m1x-phil.lan (juv34-h02-176-184-26-1.dsl.sta.abo.bbox.fr. [176.184.26.1]) by smtp.gmail.com with ESMTPSA id f11-20020a5d50cb000000b00336ebf27d59sm1602952wrt.78.2024.01.05.07.43.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 05 Jan 2024 07:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704469401; x=1705074201; 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=ZrhO0fF/4wCYRBDkij/JpNIZFZJdEux3joJ/5vLZ4GY=; b=bwi3kpzGGNXCOg+20oW7rcdO6hXQlCRbkxobFttj7cxuRBleMFixnF2Ffg1G7TqmrC zyWrEFwzJZGrK8EdQzJLdfazNeoKvWs7HZK2MNvl+tD56VzMbScGxjlhxq6K0NZAIP3H GIt1Fq4zu/EwWdj/2oNgAA9VaZWUBLEADJkyV34Oyt+MtzQ+plYOnI4DGDXL8SentVz0 upHwkNMV60xGHNiqhX1Bq7nmm3M+3eanaKYgES8SO3B+eS6NqQ5jw0UFfxIL8aa6EwxO YHBPIxJlKa+zxEEMbe4jnbi4w2Oy/+63Hkwin2DLwSWNVdOesNH0kVhn7t2w5Pc9YWgd Q7pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704469401; x=1705074201; 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=ZrhO0fF/4wCYRBDkij/JpNIZFZJdEux3joJ/5vLZ4GY=; b=Cn/l0Q3ntTjnh7ez5KmpVWZ1ED+XoS16rJzqm3YMBJv1dyP5GHo99bpxDyZ7OWe2le HQsk2511spyUlRhL4MSJMDuJvEdGE12Jz+JOD+euyxWh3LC5xe2XgxY2ZW6IEAZLwt/2 xNt+Jdej/aiJPT1hV1J5h/ozM3ccmPYb5BDILZf8ClaW3HKo6MQFN5JEQI0XrUBWasil L1dwZexkhJPPr8Q5qNTaVHz2QF+UGSqpXMCJS+8IR6230dfmlp4F9PIIn5jVdgvyjD7m nJK+TYUXpNxVemaI0T2A9Im0q2dij03hTl78V+u/okFtPIpnd41FiJgdQEha5PgrhGES 2OBg== X-Gm-Message-State: AOJu0YwlwbvmQhgNaVb8HiBOj3094WCcyI8yV+87zOBkbVLTSIBOtdMP paRia0zJ+QJguhI3r9TePUq2ZXz74AimxZi/sCt5c2ROfb8= X-Google-Smtp-Source: AGHT+IHxztSSE/NnhY4IOTid4JhG7CbAzUhLc9/SoRCe3oHUBTcxxyGJGlHE4o66X9PU5RD/GKJPIw== X-Received: by 2002:adf:f282:0:b0:337:39e3:3b71 with SMTP id k2-20020adff282000000b0033739e33b71mr1335279wro.74.1704469401108; Fri, 05 Jan 2024 07:43:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Gavin Shan , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Subject: [PULL 02/71] target/alpha: Remove fallback to ev67 cpu class Date: Fri, 5 Jan 2024 16:41:55 +0100 Message-ID: <20240105154307.21385-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240105154307.21385-1-philmd@linaro.org> References: <20240105154307.21385-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: 1704469469046100003 From: Gavin Shan 'ev67' CPU class will be returned to match everything, which makes no sense as mentioned in the comments. Remove the logic to fall back to 'ev67' CPU class to match everything. Signed-off-by: Gavin Shan Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20231114235628.534334-2-gshan@redhat.com> [PMD: Reword subject, replace 'any' -> 'ev67' on linux-user] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/alpha/target_elf.h | 2 +- target/alpha/cpu.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/linux-user/alpha/target_elf.h b/linux-user/alpha/target_elf.h index 344e9f4d39..b77d638f6d 100644 --- a/linux-user/alpha/target_elf.h +++ b/linux-user/alpha/target_elf.h @@ -9,6 +9,6 @@ #define ALPHA_TARGET_ELF_H static inline const char *cpu_get_model(uint32_t eflags) { - return "any"; + return "ev67"; } #endif diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 39cf841b3e..91fe8ae095 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -141,11 +141,8 @@ static ObjectClass *alpha_cpu_class_by_name(const char= *cpu_model) typename =3D g_strdup_printf(ALPHA_CPU_TYPE_NAME("%s"), cpu_model); oc =3D object_class_by_name(typename); g_free(typename); - - /* TODO: remove match everything nonsense */ - if (!oc || object_class_is_abstract(oc)) { - /* Default to ev67; no reason not to emulate insns by default. */ - oc =3D object_class_by_name(ALPHA_CPU_TYPE_NAME("ev67")); + if (!oc || !object_class_dynamic_cast(oc, TYPE_ALPHA_CPU)) { + return NULL; } =20 return oc; --=20 2.41.0