Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: James Clark <james.clark@linaro.org>
Cc: Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>,
	Fuad Tabba <fuad.tabba@linux.dev>,
	Joey Gouly <joey.gouly@arm.com>,
	Steffen Eiden <seiden@linux.ibm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Shuah Khan <shuah@kernel.org>,
	Colton Lewis <coltonlewis@google.com>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	kvm@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: selftests: Pin vpmu_counter_access to one CPU
Date: Fri, 4 Dec 2026 12:20:35 +0000	[thread overview]
Message-ID: <20261204122035.GA3159023@e132581.arm.com> (raw)
In-Reply-To: <20261125-james-kvm-pin-pmu-test-v1-1-c3ce989233fb@linaro.org>

On Wed, Nov 25, 2026 at 03:36:03PM +0000, James Clark wrote:
> The vpmu_counter_access test reads the maximum PMCR_EL0.N from one VM
> and then creates new VMs for each number of counters up to that limit.
> If the test migrates between CPU types the limit may not be valid for
> the new VM which causes:
> 
>   ==== Test Assertion Failure ====
>     arm64/vpmu_counter_access.c:483: !ret
>     pid=9165 tid=9165 errno=22 - Invalid argument
>   ...
>     KVM_SET_DEVICE_ATTR failed, rc: -1 errno: 22 (Invalid argument)
> 
> For example on a Radxa Orion O6 with 20 counters on the big cores and 6
> on the little cores, this happens on most runs.
> 
> Fix it by pinning the test to the CPU that it starts on before any VMs
> are created.

It seems pinning the test thread is sufficient here. The same thread
calls vcpu_run(), so the guest also runs on that CPU.

> Signed-off-by: James Clark <james.clark@linaro.org>

Reviewed-by: Leo Yan <leo.yan@arm.com>


  reply	other threads:[~2026-12-04 12:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 15:36 [PATCH] KVM: arm64: selftests: Pin vpmu_counter_access to one CPU James Clark
2026-12-04 12:20 ` Leo Yan [this message]
2026-12-04 13:10 ` Fuad Tabba

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=20261204122035.GA3159023@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=coltonlewis@google.com \
    --cc=fuad.tabba@linux.dev \
    --cc=james.clark@linaro.org \
    --cc=joey.gouly@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=seiden@linux.ibm.com \
    --cc=shuah@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox