Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11622954rwl; Tue, 3 Jan 2023 02:06:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXsOe2P/WcpgmVadMwA0AGNkroOvwpwfWaXWahGpWoNsGK4ysh9EWcCe1opT212RSeg5fcw2 X-Received: by 2002:a17:90a:cb81:b0:226:619f:1a32 with SMTP id a1-20020a17090acb8100b00226619f1a32mr9815240pju.25.1672740384145; Tue, 03 Jan 2023 02:06:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672740384; cv=none; d=google.com; s=arc-20160816; b=cEorjaVt61cIDXwIQSeipZbXRy/XL6/wVzjx9NetqioMjq5nBYR9JA4KoWmIrfMvnT AOYjO6Mv5EcAjDr2Rz1+mgXP5TfPBXsV1PiA7QsOFrG3CqcJHr479uCnvWJmYxTDjElt QD2vYglKYVQF3YrQfRdUcDhIEo82X/UZ3EXUCims6mVfy0xcga492FbC1SjQaFS0Kika lsGgnT6dqVU7IfKi/bSpErgkCT8ALlk/FjV8yLgCG8E3laCSd0Yo8wmQp/QqMYPc8dPl unziAJ4CK9jHRc9cfGyZfEJRAtbicz/7P69vPuc3P0/HtYty1rnorTEbdrflNCOg3pXB s1sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MIIFIt+0IVMLgBIZlpABZ7i+GF8iBQWNfwpr9xKik08=; b=kWiTsXhuRB7eGOpIBrlbJjtNY6atuJRUOeIURGqd0W0m7ivW9YAjS4uQdcNLAQ827U TH9EppGcu5tXrAFVNJyC2ReJsaLa/3LxQZ3Kj+O+wnh0z0V/4waf/CinALKv/JkoxI5o sgVEwxtcr+jomHJa4+yNWJH3fhdQ3sA2q4IAGfA4xJz9xztvVQz/j6FcboONE4C2zePL py955+0+Ox0p8Y36YsZsAlZMC8AdfmIFJSC66ZV+y2ptatOEn6xkcCGhHcs8Z6d3ldCj GT7VlnBITwUYgPg6uuVRPFUaoGnpGIoCPeumyx9CF84liKQ6P6M3UMfct+rgU6JJHpah +LSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P8t5ZX9H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om4-20020a17090b3a8400b002189d2ba5a3si33954922pjb.133.2023.01.03.02.06.16; Tue, 03 Jan 2023 02:06:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P8t5ZX9H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237298AbjACJvD (ORCPT + 61 others); Tue, 3 Jan 2023 04:51:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237279AbjACJup (ORCPT ); Tue, 3 Jan 2023 04:50:45 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02248E0DD for ; Tue, 3 Jan 2023 01:50:44 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A5246B80E71 for ; Tue, 3 Jan 2023 09:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 431CFC433EF; Tue, 3 Jan 2023 09:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672739441; bh=QagyCicwiw0PUhea9wxFGenMt5PRvlzgWVpE9fRmJ5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P8t5ZX9HZcFmk5luOzpQRjJGb8pu7v1GjJa2RKUPzf6jz1PzAvVn5Ao4HbJGhdtjM oM/RJ5zGFmZ+gzNE5shxvH50pd4qhqDPoHi7w2n87mESwTpBiN6+EcwsAz2AU6Fj2P Zcbv9GVs0l/iSOCRYMn4WIKbEKYU8DV+Y0Rie0jltvIMLm1IgILqVFh/j8iRGFJws8 gaPYdGyeX8Iwc0KwgRclDfD1/jBOfRIhJ7vMYvCDG4laTk9H1OFsgoVgBf7pdDH3cW /wFpI10IYxf3zxS1/UIHmjUa5+x7SiL+PvWUNto1uyx2yePaotHUNAVCPhJyzptjK2 AV9pO/guE+4hQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pCdwN-00GTcP-DI; Tue, 03 Jan 2023 09:50:39 +0000 From: Marc Zyngier To: , Cc: Hector Martin , Sven Peter , Alyssa Rosenzweig , Thomas Gleixner , Will Deacon , Catalin Marinas , James Morse , Suzuki K Poulose , Alexandru Elisei , Oliver Upton , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] KVM: arm64: vgic: Add Apple M2 cpus to the list of broken SEIS implementations Date: Tue, 3 Jan 2023 09:50:20 +0000 Message-Id: <20230103095022.3230946-2-maz@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230103095022.3230946-1-maz@kernel.org> References: <20230103095022.3230946-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.cs.columbia.edu, kvmarm@lists.linux.dev, marcan@marcan.st, sven@svenpeter.dev, alyssa@rosenzweig.io, tglx@linutronix.de, will@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, oliver.upton@linux.dev, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I really hoped that Apple had fixed their not-quite-a-vgic implementation when moving from M1 to M2. Alas, it seems they didn't, and running a buggy EFI version results in the vgic generating SErrors outside of the guest and taking the host down. Apply the same workaround as for M1. Yes, this is all a bit crap. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/cputype.h | 4 ++++ arch/arm64/kvm/vgic/vgic-v3.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 4e8b66c74ea2..683ca3af4084 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -124,6 +124,8 @@ #define APPLE_CPU_PART_M1_FIRESTORM_PRO 0x025 #define APPLE_CPU_PART_M1_ICESTORM_MAX 0x028 #define APPLE_CPU_PART_M1_FIRESTORM_MAX 0x029 +#define APPLE_CPU_PART_M2_BLIZZARD 0x032 +#define APPLE_CPU_PART_M2_AVALANCHE 0x033 #define AMPERE_CPU_PART_AMPERE1 0xAC3 @@ -177,6 +179,8 @@ #define MIDR_APPLE_M1_FIRESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM_PRO) #define MIDR_APPLE_M1_ICESTORM_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_MAX) #define MIDR_APPLE_M1_FIRESTORM_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM_MAX) +#define MIDR_APPLE_M2_BLIZZARD MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M2_BLIZZARD) +#define MIDR_APPLE_M2_AVALANCHE MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M2_AVALANCHE) #define MIDR_AMPERE1 MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1) /* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */ diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c index 826ff6f2a4e7..c6442b08fe80 100644 --- a/arch/arm64/kvm/vgic/vgic-v3.c +++ b/arch/arm64/kvm/vgic/vgic-v3.c @@ -615,7 +615,8 @@ static const struct midr_range broken_seis[] = { MIDR_ALL_VERSIONS(MIDR_APPLE_M1_ICESTORM_PRO), MIDR_ALL_VERSIONS(MIDR_APPLE_M1_FIRESTORM_PRO), MIDR_ALL_VERSIONS(MIDR_APPLE_M1_ICESTORM_MAX), - MIDR_ALL_VERSIONS(MIDR_APPLE_M1_FIRESTORM_MAX), + MIDR_ALL_VERSIONS(MIDR_APPLE_M2_BLIZZARD), + MIDR_ALL_VERSIONS(MIDR_APPLE_M2_AVALANCHE), {}, }; -- 2.34.1