From patchwork Fri Nov 18 18:22:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Upton X-Patchwork-Id: 13048572 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 92B89C433FE for ; Fri, 18 Nov 2022 18:23:48 +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: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=y6B01jJKAH2+H2diXgG+bWvL1xAQzvOqTWoT51fApi4=; b=ykg44kSP28/L8E b6vdFu39IkRlY3/cgkUWbbEgsAeQpGm3cgnRt7omAaNu2cJQRU/D7ODzneZCd30uWd4v+CJ5+ISTf sKmFc6+AwNPUxupFzc2171rPIwjbprYL48yg4UCkHON3HFtWTRYeoScLAOUvY5fm8EIjid4uqZRpB i2GZ02TrO5QhG5GdUuJbjsZiscj3GvIv0Qp0j0KDXAh/N71su4OthTOKLFsZma0Z61Q4ak7u9wL/i y2HeYd39iwIlTwi6Sm0dv90cyZHkmFJTu3ltQ0yu1KOQCDITpr0RRiLGSn/FbTzDOaKr0T7ZWVMaX czFjvkcSRvUKEaJSHKRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow60g-006R8f-Ib; Fri, 18 Nov 2022 18:22:42 +0000 Received: from out2.migadu.com ([188.165.223.204]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow60d-006R0R-21 for linux-arm-kernel@lists.infradead.org; Fri, 18 Nov 2022 18:22:40 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1668795752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=X3QgCq9Cs1WQYoJL0dvRfozZCN58kkuvkY3dlbpQxA0=; b=lNR7BG2xlqj9DA3KvAaQJbfmbXR8ph56cTV2x9m89DaPyumgHHR9/DGSNBKAvckoa0b6Pp UuDMc2gPhsNp+XbYnttyuhGhZMPnLOYzmcYsbalOM2noVK3bZ7f0fHCPves1FwYShNimdp tFDjE/qc/9BtPLR32uCBbZu2VNneSdg= From: Oliver Upton To: Marc Zyngier , James Morse , Alexandru Elisei Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kvmarm@lists.linux.dev, Will Deacon , Oliver Upton Subject: [PATCH v4 0/3] KVM: arm64: Fixes for parallel faults series Date: Fri, 18 Nov 2022 18:22:19 +0000 Message-Id: <20221118182222.3932898-1-oliver.upton@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221118_102239_542335_9CD6E407 X-CRM114-Status: UNSURE ( 6.33 ) X-CRM114-Notice: Please train this message. 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 Small set of fixes for the parallel faults series. Most importantly, stop taking the RCU read lock for walking hyp stage-1. For the sake of consistency, take a pointer to kvm_pgtable_walker in kvm_dereference_pteref() as well. Tested on an Ampere Altra system with kvm-arm.mode={nvhe,protected} and lockdep. Applies on top of the parallel faults series picked up last week. v3: https://lore.kernel.org/kvmarm/20221116165655.2649475-1-oliver.upton@linux.dev/ v3 -> v4: - Return an error instead of WARN() in hyp for shared walks (Will) Oliver Upton (3): KVM: arm64: Take a pointer to walker data in kvm_dereference_pteref() KVM: arm64: Don't acquire RCU read lock for exclusive table walks KVM: arm64: Reject shared table walks in the hyp code arch/arm64/include/asm/kvm_pgtable.h | 159 +++++++++++++++------------ arch/arm64/kvm/hyp/pgtable.c | 13 ++- 2 files changed, 96 insertions(+), 76 deletions(-) Acked-by: Will Deacon