From patchwork Mon Feb 5 10:34:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13545189 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 94609C48298 for ; Mon, 5 Feb 2024 10:35:29 +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: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h6F2lKMbTWLkC4xjr5wpoUT7EkJpN5VWmO+Jl9PpYAw=; b=0eCTwYs+87rMtn TYxytcRCjYu/pUpH6E8V/K4FrJ/psTRDSX8X6fUj3H+QfUxdMQbKZEIa3Xl/aa2vZboltao1yh1bZ 88QEhaIlh8U4kiJejDW6q+5QKqz1EO7t+rCoDylvoEq9Jz4DGY6C9L8fUkvMf40SNImX69x60G4Gx fGmw+cfQ/yjFlb+M9BDbMplY7Y4Bdkl2UFZJak7H9IfrU2AJR6reaQ5iit7EM/yCkFfjPRj4R3nXl Ar2cr/lISHv66ciYr3gjKdS9K6d9/GmN09jTmWTEM7H0wpumlKCWx0sSNvFGnv+hCkiEEWyvEQLpk jM7k7+yC1keIRfifhiTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWwJl-00000002pNu-12ew; Mon, 05 Feb 2024 10:35:13 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWwJP-00000002p69-314h for linux-arm-kernel@lists.infradead.org; Mon, 05 Feb 2024 10:34:53 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 8627260FED; Mon, 5 Feb 2024 10:34:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55A2AC433A6; Mon, 5 Feb 2024 10:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707129289; bh=EjcpbmtgtYwiSeP6njS/Mpa43D4V2P6D38wyQWR23GI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R7nqYlgXK4qHeJ56fZdq48sdu6oRzQA2jGkUFShH0u+L6/QE1sC/mQqF6goRHO3Jd NUayy7l8kLc6XV4lSiWLMVpiXfqeBgZ0H6aMov6G3w2sWx6OOfR736C4WAyypRLjme tLm/XIhK6bx41rw1PGbX9btI63kgZopdHPHFfuuKFPdjat/h6AykM2jzxEk1FLDYyT lnM7ehVTJi2cC7UqwgZrjN0zFAX8DumBldAbeGbZHokPoiHrhrk92+urjOAKuTC5YX q/uG7NpWdzSWY2nmwfwuL1ZwMEWYWKcAk5G3hLh1NiutH6F4RFTdHh54/KUbV7s4uI pkr/E3OLSFavw== 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 1rWwJL-000Nc3-DN; Mon, 05 Feb 2024 10:34:47 +0000 From: Marc Zyngier To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Catalin Marinas , Will Deacon , Joey Gouly , Mark Brown Subject: [PATCH v3 13/26] KVM: arm64: Always populate the trap configuration xarray Date: Mon, 5 Feb 2024 10:34:18 +0000 Message-Id: <20240205103431.1104133-14-maz@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240205103431.1104133-1-maz@kernel.org> References: <20240205103431.1104133-1-maz@kernel.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, joey.gouly@arm.com, broonie@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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240205_023452_058388_844BD138 X-CRM114-Status: GOOD ( 11.87 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As we are going to rely more and more on the global xarray that contains the trap configuration, always populate it, even in the non-NV case. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier --- arch/arm64/kvm/sys_regs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 70043bd78cd4..57f3d0c53fc3 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -3995,8 +3995,5 @@ int __init kvm_sys_reg_table_init(void) if (!first_idreg) return -EINVAL; - if (kvm_get_mode() == KVM_MODE_NV) - return populate_nv_trap_config(); - - return 0; + return populate_nv_trap_config(); }