All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Cc: maz@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com,
	yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org,
	alexandru.elisei@arm.com, linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: Check cpu_has_spe() before initializing PMSCR_EL1 in VHE
Date: Tue, 7 Oct 2025 11:31:45 -0700	[thread overview]
Message-ID: <aOVckTSJET5ORY1n@linux.dev> (raw)
In-Reply-To: <20251007182356.2813920-1-mukesh.ojha@oss.qualcomm.com>

Hi Mukesh,

I find it a bit odd to refer to cpu_has_spe() in the shortlog, which
doesn't exist prior to this patch.

On Tue, Oct 07, 2025 at 11:53:56PM +0530, Mukesh Ojha wrote:
> commit efad60e46057 ("KVM: arm64: Initialize PMSCR_EL1 when in VHE")
> initializes PMSCR_EL1 to 0 which is making the boot up stuck when KVM
> runs in VHE mode and reverting the change is fixing the issue.
> 
> [    2.967447] RPC: Registered tcp NFSv4.1 backchannel transport module.
> [    2.974061] PCI: CLS 0 bytes, default 64
> [    2.978171] Unpacking initramfs...
> [    2.982889] kvm [1]: nv: 568 coarse grained trap handlers
> [    2.988573] kvm [1]: IPA Size Limit: 40 bits
> 
> Lets guard the change with cpu_has_spe() check so that it only affects
> the cpu which has SPE feature supported.

This could benefit from being spelled out a bit more. In both cases we
check for the presence of FEAT_SPE, however I believe the issue you
observe is EL3 hasn't delegated ownership of the Profiling Buffer to
Non-secure nor does it reinject an UNDEF in response to the sysreg trap.

I agree that the change is correct but the rationale needs to be clear.

Thanks,
Oliver

  reply	other threads:[~2025-10-07 19:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 18:23 [PATCH] KVM: arm64: Check cpu_has_spe() before initializing PMSCR_EL1 in VHE Mukesh Ojha
2025-10-07 18:31 ` Oliver Upton [this message]
2025-10-08 10:46   ` Marc Zyngier
2025-10-08 12:40     ` Leo Yan
2025-10-08 16:50       ` Mukesh Ojha
2025-10-08 18:17         ` Leo Yan
2025-10-08 18:26     ` Oliver Upton
2025-10-09  9:11       ` Suzuki K Poulose
2025-10-08 11:53   ` Mukesh Ojha

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=aOVckTSJET5ORY1n@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=alexandru.elisei@arm.com \
    --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=maz@kernel.org \
    --cc=mukesh.ojha@oss.qualcomm.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.