Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11624378rwl; Tue, 3 Jan 2023 02:07:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXuae8RYgwQxdHb5mAYN5DAaDv4mPRq9oD408FBLqqJTerV4RV0KAVKykkDPOCZesjgzBRP1 X-Received: by 2002:a17:90b:3711:b0:223:3fde:83a3 with SMTP id mg17-20020a17090b371100b002233fde83a3mr47811304pjb.40.1672740475062; Tue, 03 Jan 2023 02:07:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672740475; cv=none; d=google.com; s=arc-20160816; b=QUGZb3FC/Ad9FJA3SBlOd89NBxpo7lgB110SSsMtFGzwuZUydwDol35jahukjOl785 g98dGmY0d780/xsTPI7ozv5bP/2w62q/qsqFTLvW6XyoZl/b9wvrvhWErl0sPqD9D/+w 3ppo4NMh5m8zPr9uvmoUnlxgRazksGx/bOSX0D0HrTVkFeurhb83ay74bpryjpH6CAlB KK3iE9MkDQs88Ow5j/uAPCPqIuNgedpdARZeYbVw9cLxJl+wYkVQV/G0Ztcj7csKcFTf dcmybaJGkyV0J45PDZnHElg4QKuf51XDqpXEadigsS5tZ2A77xXrDTIlrGttcdzKF8hl lENw== 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=htg8DhP+D4x/jC+a1Cjt29Dg0KsGHiNH//byxYuMv2U=; b=SacgLyzFY0xtInUbcFzHKVOxevANhl1Rke/zQeMKIZmClM3XirMGqqShPoZAfhlU0V 2i5IYMbaRNVHassuGfmp7q+yigS+fM0DEhwONmUDXZ3pfYaz0VLiN3DQ65i23SApEtPR D4ZpGSiQ8H0YsSCpYt27jro40oXfGHRhXW5sFeff9R1oTXc8TG8NsME1gj+JrQY4p52x ivuJhTbUyaJILUll5txlTmFCC7dDz4E6NwI8KfzXzydNdmXNcY3+w5gywoDaE2NhPQcB dacB8k7BDipd/BJ1Rb/sKu/3wlJ3YL6e4ROtJsexBRPJNV60uLMs5CF+7l/OZAj+lpxc hCWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GdQr+NHP; 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 ng10-20020a17090b1a8a00b002233c2053c8si33795941pjb.78.2023.01.03.02.07.47; Tue, 03 Jan 2023 02:07:55 -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=GdQr+NHP; 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 S237286AbjACJu7 (ORCPT + 61 others); Tue, 3 Jan 2023 04:50:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237281AbjACJup (ORCPT ); Tue, 3 Jan 2023 04:50:45 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BA3AE0F7 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 52812B80E74 for ; Tue, 3 Jan 2023 09:50:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8E3DC43392; 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=ARLfbpBM69dXDtUx7JEBSy4KWdTmviEfk9qRcpSeYPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GdQr+NHPQAJ+Ij1jsH782ej6DuZ5M8bl5ceEdI/mosMJn2peIBgjl6D0kygQrEENF DsFyhme9/k7cYXWf04r1jjTRFsX0YtAEV9Or2S8q479OhNynAfZkrD1VP/ehs3h+7E ytfNGEs5Kl6ZreIkkH/9CCfkjLkCJveo/dgYrzWct0stsioYg6ES1HNn5vLe7GLloI djxp8FssKWatHN5BshdArNm0pRLOyTxq30Nyb6/V/hgoxAFcL7yOiyS0CBR62gxF4i OLZvTYaFHF/kAQFZRGg5aNAYcgtiRnpTN0piWe1QsED3pPvSAIfpeOX8jFFe2cnPsO AeJptl9eUoRNA== 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-M8; 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 2/3] KVM: arm64: vgic: Allow registration of a non-maskable maintenance interrupt Date: Tue, 3 Jan 2023 09:50:21 +0000 Message-Id: <20230103095022.3230946-3-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 Our Apple M1/M2 friends do have a per-CPU maintenance interrupt, but no mask to make use of it in the standard Linux framework. Given that KVM directly drives the *source* of the interrupt and leaves the GIC interrupt always enabled, there is no harm in tolerating such a setup. It will become useful once we enable NV on M2 HW. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/vgic/vgic-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/vgic/vgic-init.c b/arch/arm64/kvm/vgic/vgic-init.c index f6d4f4052555..e61d9ca01768 100644 --- a/arch/arm64/kvm/vgic/vgic-init.c +++ b/arch/arm64/kvm/vgic/vgic-init.c @@ -572,7 +572,7 @@ int kvm_vgic_hyp_init(void) if (ret) return ret; - if (!has_mask) + if (!has_mask && !kvm_vgic_global_state.maint_irq) return 0; ret = request_percpu_irq(kvm_vgic_global_state.maint_irq, -- 2.34.1