From patchwork Wed Nov 2 09:10:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 1698080 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=R48+0nYe; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=sRjh0cGi; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N2LjK0rtHz23lK for ; Wed, 2 Nov 2022 20:11:17 +1100 (AEDT) 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: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:In-Reply-To:References: List-Owner; bh=tTLiix4ulfaW4/EtQoZFV8gl+tITabLL+uNslpjmaaQ=; b=R48+0nYebOuJOZ riizrKdu22IDbxVyMiqN87NzkGx3kNuQHBoEc5M4iGqKkOM3mXuacr9+akpTX9wC82abXmn5gkCfR TTsVnataPYhp4V90fh4120P41LPWJ4lJO94JfCDAV7NlcVjVrxC52ecIGTSeyoLYYmTnhQA/LeIYH ji+Xuyjr3vH69nQNRTO2yQdDvJyZdEB2JteRRSdIAPsL/QAWlj42w7O70vMpXkCv4azECbBvRPHCX goUL8RZV/Q8XZ6SqfD7PLfIvqCzqyBQkN9c4goERLKnStzMw9QnN3t1GvvUzmxU6nMigswZlWzwMB vXQ2jqijBtvONVjcYBKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oq9lx-009wFp-PF; Wed, 02 Nov 2022 09:10:57 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oq9lu-009vy4-1X for linux-arm-kernel@lists.infradead.org; Wed, 02 Nov 2022 09:10:55 +0000 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 541DCB81AF4; Wed, 2 Nov 2022 09:10:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E59FCC433C1; Wed, 2 Nov 2022 09:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667380251; bh=3NBoQ3ldUa+yOxeyENfnkBM2LyM5YloHDrknbDGq34c=; h=From:To:Cc:Subject:Date:From; b=sRjh0cGisFS4038BuCp8168oQUNIM6TzP9MDeK+A0wKFoWjwjVx2qpg6D7I8+JyP1 Nungr/01NBkg9bQ2/wrYS9KsVKk/U/K4phdPtTVG0QfUBI9S6hkvxIYc0qISXh4Uis 2Hk5bYADdWLGMR1Y3b9i9lDzbWHbSbzPNVRPDm7VpDX+g0QHelLg0YN/TCTAVvmVUF PLHc/0axacHTHKo0BLh9V9YdGUVCNYoWS2eyIm3aUtOqC+4Ir+bfQ5htnxgs9vZuun V+hLoiGyqYPG1BbzEfTnZgKIPTf3SPxrHVsBwLvVi8brtpVFTA/O1rAMtPBl/dIIFV bDkug7413Jmfg== 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 1oq9lo-003AWO-FX; Wed, 02 Nov 2022 09:10:48 +0000 From: Marc Zyngier To: Paolo Bonzini Cc: Catalin Marinas , Gavin Shan , Mark Brown , Oliver Upton , Quentin Perret , Ryan Roberts , Sean Christopherson , Steven Price , James Morse , Suzuki K Poulose , Alexandru Elisei , , , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Subject: [GIT PULL] KVM/arm64 fixes for 6.1, take #3 Date: Wed, 2 Nov 2022 09:10:36 +0000 Message-Id: <20221102091036.2106882-1-maz@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: pbonzini@redhat.com, catalin.marinas@arm.com, gshan@redhat.com, broonie@kernel.org, oliver.upton@linux.dev, qperret@google.com, ryan.roberts@arm.com, seanjc@google.com, steven.price@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, kvmarm@lists.cs.columbia.edu, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221102_021054_414801_6F5D37A4 X-CRM114-Status: GOOD ( 15.10 ) X-Spam-Score: -5.4 (-----) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Paolo, Here's another set of fixes for 6.1. Two of them are critical fixes (MTE support triggering an invalid pointer dereference in nVHE configurations, SME trapping not enabled in VHE configurations). Than [...] Content analysis details: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [145.40.68.75 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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+incoming-imx=patchwork.ozlabs.org@lists.infradead.org Paolo, Here's another set of fixes for 6.1. Two of them are critical fixes (MTE support triggering an invalid pointer dereference in nVHE configurations, SME trapping not enabled in VHE configurations). Thankfully, these configuration are pretty rare, because hardly anyone is making us of MTE yet, and that SME HW simply doesn't exist in the wild. The rest is a limited set of fixes for relatively harmless bugs and documentation update. Please pull, M. The following changes since commit 247f34f7b80357943234f93f247a1ae6b6c3a740: Linux 6.1-rc2 (2022-10-23 15:27:33 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-6.1-3 for you to fetch changes up to be0ddf5293a7895a8c9096e1a8560930c6a0ab3f: arm64: booting: Document our requirements for fine grained traps with SME (2022-11-01 19:30:34 +0000) ---------------------------------------------------------------- KVM/arm64 fixes for 6.1, take #3 - Fix the pKVM stage-1 walker erronously using the stage-2 accessor - Correctly convert vcpu->kvm to a hyp pointer when generating an exception in a nVHE+MTE configuration - Check that KVM_CAP_DIRTY_LOG_* are valid before enabling them - Fix SMPRI_EL1/TPIDR2_EL0 trapping on VHE - Document the boot requirements for FGT when entering the kernel at EL1 ---------------------------------------------------------------- Gavin Shan (1): KVM: Check KVM_CAP_DIRTY_LOG_{RING, RING_ACQ_REL} prior to enabling them Marc Zyngier (1): KVM: arm64: Fix SMPRI_EL1/TPIDR2_EL0 trapping on VHE Mark Brown (1): arm64: booting: Document our requirements for fine grained traps with SME Quentin Perret (1): KVM: arm64: Use correct accessor to parse stage-1 PTEs Ryan Roberts (1): KVM: arm64: Fix bad dereference on MTE-enabled systems Documentation/arm64/booting.rst | 8 ++++++++ arch/arm64/kvm/hyp/exception.c | 3 ++- arch/arm64/kvm/hyp/include/hyp/switch.h | 20 ++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 2 +- arch/arm64/kvm/hyp/nvhe/switch.c | 26 -------------------------- arch/arm64/kvm/hyp/vhe/switch.c | 8 -------- virt/kvm/kvm_main.c | 3 +++ 7 files changed, 34 insertions(+), 36 deletions(-)