All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Quentin Perret <qperret@google.com>
Cc: Oliver Upton <oliver.upton@linux.dev>,
	Joey Gouly <joey.gouly@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	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()
Date: Tue, 25 Feb 2025 18:02:02 +0000	[thread overview]
Message-ID: <87jz9d299h.wl-maz@kernel.org> (raw)
In-Reply-To: <20250225015327.3708420-3-qperret@google.com>

On Tue, 25 Feb 2025 01:53:25 +0000,
Quentin Perret <qperret@google.com> 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 <qperret@google.com>
> ---
>  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.

  reply	other threads:[~2025-02-25 18:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  1:53 [PATCH v2 0/4] Selftest for pKVM ownership transitions Quentin Perret
2025-02-25  1:53 ` [PATCH v2 1/4] KVM: arm64: Add .hyp.data section Quentin Perret
2025-02-25  1:53 ` [PATCH v2 2/4] KVM: arm64: Don't WARN from __pkvm_host_share_guest() Quentin Perret
2025-02-25 18:02   ` Marc Zyngier [this message]
2025-02-25 19:49     ` Quentin Perret
2025-02-26 14:21       ` Marc Zyngier
2025-02-25  1:53 ` [PATCH v2 3/4] KVM: arm64: Selftest for pKVM transitions Quentin Perret
2025-02-26 14:32   ` Marc Zyngier
2025-02-26 18:10     ` Quentin Perret
2025-02-25  1:53 ` [PATCH v2 4/4] KVM: arm64: Extend pKVM selftest for np-guests Quentin Perret

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jz9d299h.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=qperret@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.