From patchwork Mon Jul 10 22:25:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 701098 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5411225wrs; Mon, 10 Jul 2023 15:33:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlGH61bRWhyxxKKMuzI85zPtlhriNUVTfx+N2WEAXIvgFVGmtIz6VgmEk2YPnC7/qQphrlh4 X-Received: by 2002:a05:622a:199a:b0:403:b1f4:2508 with SMTP id u26-20020a05622a199a00b00403b1f42508mr3089249qtc.27.1689028418723; Mon, 10 Jul 2023 15:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689028418; cv=none; d=google.com; s=arc-20160816; b=rXgOkzQFSCN5IspuxVAaH54qPAJre9COZjdbnN778zj9+dhaNe1Hm9H09hcOmfTf8x GdWWJTf4O9NBZ6fzlWNhLASZs7Cbmvb83jqSRTR/Az1IjL3UOKtua1BkOIY5VJjYjmpv M1EZ6JyLYkTWdfeoNZsJhu+2J67e8I6TP7UNlG52zWDmmMdzVKTgrA1oQB/InFv2+Vnv heIw4CyopRZb9K8nJq+IqapNKaFT0zpbAUL12YYxhvHDfq7rCGqbqOeT0Hw3FammNVWm XmPe2UL3GoOeDyUjbf69iUuMJjKTFuzg3bkGC2GGePgw1xbwmpkGwrUDv5ko79OrA3Gd Kclw== 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:cc:to :from:dkim-signature; bh=FQn1GjoC4A2rsKEvs+LWc6jELr6JbHXlZFPyo2gF2Rw=; fh=bu9kv7nLVntBptyUjn85d0dzQ/yk/vWp3GUpc2G2nFI=; b=0p3707wprEpyD/jnzHnmyjoxHZyDpCZ/9ccFrUDBZu25aJpfwNofivb6omtPLLNbIr Ulx04CjNe34ZO4edZiRuJWIL1B01t1B5akPSYYdWYIloVXFUEABSwTsMxdapwi70pI1h +1TmyglN43pQWxs7XCog/Z2zFKg93Ryx4zmNl17UnYZ0bn7ZSd6hvjI8XrXlJUZbRQmI Rx3KB61oCGe8Jpiw6abyRgCAKG0If7NWK158Cb8SFTdsN/Kyu9w5UTw84cvkoQw43+oM Daf/K3bE5BLOlTPpMRxWakyRqts53L0WMsXHMIjUv9RXKSJ9PBxDuKydht5KXVhzzrwD CmgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SH3nekmR; 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 z14-20020ac87f8e000000b003fdeb6b4fd5si308163qtj.766.2023.07.10.15.33.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 15:33:38 -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=SH3nekmR; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIzL3-0003Sa-BS; Mon, 10 Jul 2023 18:26:37 -0400 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 1qIzL1-0003SC-Sp for qemu-devel@nongnu.org; Mon, 10 Jul 2023 18:26:35 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIzKy-0001iK-Q0 for qemu-devel@nongnu.org; Mon, 10 Jul 2023 18:26:35 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3fba8e2aa52so56054735e9.1 for ; Mon, 10 Jul 2023 15:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689027991; x=1691619991; 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=FQn1GjoC4A2rsKEvs+LWc6jELr6JbHXlZFPyo2gF2Rw=; b=SH3nekmRsrrP45NJiKYFzciJ0htGs7u1GTzBkcGtTNdr9BDOq1oEW6UlpkM4K7a0PD G2BLqpHb2GGVDgR3/T2l3xIhxrmn1tiltyrcgc+zLISf1QsokxK7tPttsf8+jJR51wXR QfMJ5vB4aAJLdENM9Y1LPh1HAFD9ATfPbZfHm6u0vod3BXrjIyEbNiDetxyOEDRC+HRX Owlscsl3uLnEwHaKok75VS1psTZypZhrFkkEzOfpB5nENvUVqxlJLVTGQ4/mwj08kwGI a1LMACpziopJ5IrWueW9h7TgsicJQbimrJN/eOXsI1VNNtcCxqMkaNH8+uqYIbJGqwgo S3GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689027991; x=1691619991; 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=FQn1GjoC4A2rsKEvs+LWc6jELr6JbHXlZFPyo2gF2Rw=; b=P1DOz7XzfTIZlHmWI9TtWLj9KEIlQygF1lbIY53kzb219RIU/QGXSMbo+AakSCBtZM B2YkQnLvghtCgDs35m53Ly5K86liD5FVWjzmJUp3RXW+fbH3nqh1oOsg95TFuBYDEZQX QCX35VC2rW1XLlaZoL4pIxhHccr/Tq5vJhF2UTpDweTyX7YcvRcMZQfbYyqShdJpZD99 57vr9xhKzRLJF40dzIekgQ5Oa5sYpu3xjMdet5GDRolc+rGYVokwP5QnHkvLpw6Rny4S pZ+fsk8MfvmQCLM3KDccigLlGIFhinbVHprhOgBKKTNJJQP/UAcRYbyXAmqSmw9fLTvq hsyw== X-Gm-Message-State: ABy/qLbdn7plTdDfh5ASUtasUinrzdRukDoFeA1BcdR5IhpLNxZfnXh+ BzWP6TsUzRGP3ng3TpjQWAPVN6oXXgSZJuU76Gapmw== X-Received: by 2002:a5d:4d8e:0:b0:314:3e77:f210 with SMTP id b14-20020a5d4d8e000000b003143e77f210mr13084116wru.59.1689027991419; Mon, 10 Jul 2023 15:26:31 -0700 (PDT) Received: from m1x-phil.lan (mst45-h01-176-184-47-225.dsl.sta.abo.bbox.fr. [176.184.47.225]) by smtp.gmail.com with ESMTPSA id c7-20020a5d4147000000b003141a3c4353sm542731wrq.30.2023.07.10.15.26.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Jul 2023 15:26:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Siarhei Volkau , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang Subject: [PULL 03/44] hw/mips/loongson3_virt: Relax CPU restrictions for TCG Date: Tue, 11 Jul 2023 00:25:30 +0200 Message-Id: <20230710222611.50978-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230710222611.50978-1-philmd@linaro.org> References: <20230710222611.50978-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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-bounces+patch=linaro.org@nongnu.org From: Jiaxun Yang After implemented CPUCFG and CSR, we are now able to boot Linux kernel with Loongson-3A4000 CPU, so there is no point to restrict CPU type to 3A1000 only, instead we just check for presence of INSN_LOONGSON3A. Signed-off-by: Jiaxun Yang Message-Id: <20230521214832.20145-3-jiaxun.yang@flygoat.com> [JY: Check for cpu_type_supports_isa(INSN_LOONGSON3A)] Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/loongson3_virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index 3dd91da7a6..4018b8c1d3 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -481,8 +481,8 @@ static void mips_loongson3_virt_init(MachineState *machine) if (!machine->cpu_type) { machine->cpu_type = MIPS_CPU_TYPE_NAME("Loongson-3A1000"); } - if (!strstr(machine->cpu_type, "Loongson-3A1000")) { - error_report("Loongson-3/TCG needs cpu type Loongson-3A1000"); + if (!cpu_type_supports_isa(machine->cpu_type, INSN_LOONGSON3A)) { + error_report("Loongson-3/TCG needs a Loongson-3 series cpu"); exit(1); } } else {