linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Gavin Shan <gshan@redhat.com>
Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, drjones@redhat.com,
	pbonzini@redhat.com
Subject: Re: [PATCH] KVM: arm64: selftests: Request PMU feature in get-reg-list
Date: Thu, 13 May 2021 12:14:22 +0100	[thread overview]
Message-ID: <d717b9272cce16c62a4e3e671bb1f068@kernel.org> (raw)
In-Reply-To: <20210513130655.73154-1-gshan@redhat.com>

On 2021-05-13 14:06, Gavin Shan wrote:
> Since the following commit, PMU registers are hidden from user until
> it's explicitly requested by feeding feature (KVM_ARM_VCPU_PMU_V3).
> Otherwise, 74 missing PMU registers are missing as the following
> log indicates.
> 
>    11663111cd49 ("KVM: arm64: Hide PMU registers from userspace when
> not available")
> 
>    # ./get-reg-list
>    Number blessed registers:   308
>    Number registers:           238
> 
>    There are 74 missing registers.
>    The following lines are missing registers:
> 
>       	ARM64_SYS_REG(3, 0, 9, 14, 1),
> 	ARM64_SYS_REG(3, 0, 9, 14, 2),
>              :
> 	ARM64_SYS_REG(3, 3, 14, 15, 7),
> 
> This fixes the issue of wrongly reported missing PMU registers by
> requesting it explicitly.
> 
> Signed-off-by: Gavin Shan <gshan@redhat.com>
> ---
>  tools/testing/selftests/kvm/aarch64/get-reg-list.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> b/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> index 486932164cf2..6c6bdc6f5dc3 100644
> --- a/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> +++ b/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> @@ -314,6 +314,8 @@ static void core_reg_fixup(void)
> 
>  static void prepare_vcpu_init(struct kvm_vcpu_init *init)
>  {
> +	init->features[0] |= 1 << KVM_ARM_VCPU_PMU_V3;
> +
>  	if (reg_list_sve())
>  		init->features[0] |= 1 << KVM_ARM_VCPU_SVE;
>  }

Please see Andrew's series[1], which actually deals with options.

         M.

[1] https://lore.kernel.org/r/20210507200416.198055-1-drjones@redhat.com
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2021-05-13 11:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 13:06 [PATCH] KVM: arm64: selftests: Request PMU feature in get-reg-list Gavin Shan
2021-05-13 11:14 ` Marc Zyngier [this message]
2021-05-13 13:20   ` Gavin Shan

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=d717b9272cce16c62a4e3e671bb1f068@kernel.org \
    --to=maz@kernel.org \
    --cc=drjones@redhat.com \
    --cc=gshan@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.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;
as well as URLs for NNTP newsgroup(s).