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 369ECC021B8 for ; Tue, 25 Feb 2025 19:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LIkGJjCNZ6Ytg+q4cnVAd5eUMd/M76ugHyPG4FDgXx4=; b=upYJ9N2HhSzJjnxRD5cDAFMAFR gOpOELcDnWQiifPWlEEnYdU58XuozCubC9oCkG+W6bMsMATERBOLCVMO6IIJvN5zrrKWQDRULGALm IV3L6kdUSWWO8t0uEKboKdWQcspN6sZYcOgh63nzHo5b5b/UZo3Tt1pojBsq25NJzQPTrjBD9SJun 8uYk3WnOzPdSKL2vc4VG+K6dYXYXlAr3yU5Bs81L24ojoXIg87PGb/RM1niAN2sdxlo1R81fLYzuE NwyVNa09gOhVrs6nCOL8Ze/6hgmCRxZXxknuPiKQGrIdoV63luSrT8WOt/gw6kPfMMjNNJlyOwz8D 3N+/Rm/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tn0eW-000000019AR-06jE; Tue, 25 Feb 2025 19:31:36 +0000 Received: from tor.source.kernel.org ([2600:3c04::f03c:95ff:fe5e:7468]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tmzFv-00000000o1t-2ptd for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2025 18:02:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 290BE612AC; Tue, 25 Feb 2025 18:02:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B40D3C4CEDD; Tue, 25 Feb 2025 18:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740506526; bh=5D3Jq4aEI57H2aSQnz43Ehnh9el1DIVokCqPWgolzlI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=a91O26sg4RN7aQ7hMvUI5TINhAUNhmy+bAeFzSotipgNX1ySyG0QgRsJFYMa6BwZl 8aEhnXgdrwMxPuIcO7KuBiZIWbVgYpoUJZa9mlIvx52UXQn2STR3FDB4jeh4jD/dcm yiZNYbQFJPkooGGxsuCvHTHIV5+hGM2TS9bQ4h5go28KVOAAsYNV9mioqnTB0x0z7I RyCyXyRE1h0Hz92J7sdLbe1CpZXfbJvn3dF/4a70eYzpAEu02APOLOEw0rfvWawJLe J5UEDljmIJ8/QdDz0t1vyvT3VeWvvK6VavPxmucrExqxQbuZXWhUyg28sVvb0cCQBT RBoWwGYdQWdkg== Received: from 82-132-223-61.dab.02.net ([82.132.223.61] 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 1tmzFs-007sEp-Ju; Tue, 25 Feb 2025 18:02:04 +0000 Date: Tue, 25 Feb 2025 18:02:02 +0000 Message-ID: <87jz9d299h.wl-maz@kernel.org> From: Marc Zyngier To: Quentin Perret Cc: Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/4] KVM: arm64: Don't WARN from __pkvm_host_share_guest() In-Reply-To: <20250225015327.3708420-3-qperret@google.com> References: <20250225015327.3708420-1-qperret@google.com> <20250225015327.3708420-3-qperret@google.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/29.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 82.132.223.61 X-SA-Exim-Rcpt-To: qperret@google.com, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, 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-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 On Tue, 25 Feb 2025 01:53:25 +0000, Quentin Perret wrote: > > We currently WARN() if the host attempts to share a page that is not in > an acceptable state with a guest. This isn't strictly necessary and > makes testing much harder, so drop the WARN and fix the error code. Are you really fixing the error code? You still seem to return a -EPERM. I guess this was never reachable thanks to WARN() being a panic with pKVM? M. > > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/hyp/nvhe/mem_protect.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c > index 19c3c631708c..ae39abc7e604 100644 > --- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c > +++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c > @@ -912,7 +912,6 @@ int __pkvm_host_share_guest(u64 pfn, u64 gfn, struct pkvm_hyp_vcpu *vcpu, > if (page->host_share_guest_count) > break; > /* Only host to np-guest multi-sharing is tolerated */ > - WARN_ON(1); > fallthrough; > default: > ret = -EPERM; > -- > 2.48.1.658.g4767266eb4-goog > > -- Without deviation from the norm, progress is not possible.