From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49D60CDB46E for ; Thu, 12 Oct 2023 15:34:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=APvMf9hF78chNNiEbvAY/P3e1SpsWuEECHEbh9YQ1m8=; b=rqGyMgwGu0F1Wh PQl3Kqn6jrBt5TKe2YbHbArmpSEQBWX0bRwUfQGysybrmZwsZoMUir4Em897D3LKupylLoTXUbPCV Nqyw6VlBJgnsUl3VTFCHIQN7EgFLq4YRlAJIDnxD5eAPNybYdH4j/dfmo/xJD8OrI8vgniAKrMu9B 2HQLN5dqB0PU5XOe1k217kGDcIUXHBQBbv0vCD+4qpzVxo74tbZ5VesTnSNyVWMOuL5O+aVEWQsmC QNMLU3gHGaJQSjjfXLZ6Gg1vp6GjN88YC6P95yKIPQC6XQT8kP9CvE0Rj10YmATx/dS02kxXdQU71 FxLY/Jvwidvj74dBB4cQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqxgw-001InD-21; Thu, 12 Oct 2023 15:33:38 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqxgs-001ImQ-2v for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 15:33:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id D416CCE26A5; Thu, 12 Oct 2023 15:33:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47B74C433C8; Thu, 12 Oct 2023 15:33:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697124810; bh=CwPhnvWDnEUB2iMIpyueJqopC6r4NltRgZimGQqlmpo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NnslaW/Jd/KRdVuwnn8qm9tC6AFgcxoSAQI2y2v82MBuQv3EGWVX/iqqOX9dYJswH NOt+xKjbiCNubMwcFqN0TRyuu5xdjlH9aoufJMxtJXKy54pj0semAuKfFCfxQ6ELaV B5B8RSWM2nlB5tDOyr7dbAPqwRNTf6OkFgyRI1e9bC03Bd5YX/o7dYFDS5QpKtZMWs ytwOiOwyPE7sPuDE7Os1iscZrD/fweJdYGb9cIg/ttztIt6dNMbI6yf1n8CCZZmYPp 6tixvja0rhHbrRSg58x1i7YjDnaUXTFKJHW4Gc39RuHGMeIzUQEVHmXocUKOMWqDBP a8Iv8J2Kl/DFA== Received: from [104.132.0.108] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qqxgl-003a1O-Kf; Thu, 12 Oct 2023 16:33:27 +0100 Date: Thu, 12 Oct 2023 16:33:25 +0100 Message-ID: <87zg0nlut6.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, kvmarm@lists.linux.dev, Suzuki K Poulose , James Morse , Zenghui Yu Subject: Re: [PATCH v1 1/2] KVM: arm64: add nPIR{E0}_EL1 to HFG traps In-Reply-To: <20231012123459.2820835-2-joey.gouly@arm.com> References: <20231012123459.2820835-1-joey.gouly@arm.com> <20231012123459.2820835-2-joey.gouly@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 104.132.0.108 X-SA-Exim-Rcpt-To: joey.gouly@arm.com, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, kvmarm@lists.linux.dev, suzuki.poulose@arm.com, james.morse@arm.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_083335_118175_E0E2D58E X-CRM114-Status: GOOD ( 14.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Joey, Please Cc all the reviewers, not only Oliver and me. On Thu, 12 Oct 2023 13:34:58 +0100, Joey Gouly wrote: > > nPIR_EL1 and nPIREO_EL1 are part of the 'reverse polarity' set of bits, set > them so that we disable the traps for a guest. It would have been helpful to indicate where these bits were defined, as they are not published in the ARM ARM. For the record, they live in the XML files available at [1]. If we're adding these, we also need to add the FGT emulation for nested, which doesn't describe these bits: diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c index 34075185af8e..f564e9b075d5 100644 --- a/arch/arm64/kvm/emulate-nested.c +++ b/arch/arm64/kvm/emulate-nested.c @@ -977,6 +977,8 @@ enum fg_filter_id { static const struct encoding_to_trap_config encoding_to_fgt[] __initconst = { /* HFGRTR_EL2, HFGWTR_EL2 */ + SR_FGT(SYS_PIR_EL1, HFGxTR, nPIR_EL1, 0), + SR_FGT(SYS_PIRE0_EL1, HFGxTR, nPIRE0_EL1, 0), SR_FGT(SYS_TPIDR2_EL0, HFGxTR, nTPIDR2_EL0, 0), SR_FGT(SYS_SMPRI_EL1, HFGxTR, nSMPRI_EL1, 0), SR_FGT(SYS_ACCDATA_EL1, HFGxTR, nACCDATA_EL1, 0), I'll amend the commit message locally and fold this in. M. [1] https://developer.arm.com/downloads/-/exploration-tools -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel