* Re: [PATCH] KVM: arm64: selftests: Request PMU feature in get-reg-list
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
2021-05-13 13:20 ` Gavin Shan
0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2021-05-13 11:14 UTC (permalink / raw)
To: Gavin Shan; +Cc: kvmarm, kvm, linux-kernel, drjones, pbonzini
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...
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] KVM: arm64: selftests: Request PMU feature in get-reg-list
@ 2021-05-13 13:06 Gavin Shan
2021-05-13 11:14 ` Marc Zyngier
0 siblings, 1 reply; 3+ messages in thread
From: Gavin Shan @ 2021-05-13 13:06 UTC (permalink / raw)
To: kvmarm; +Cc: kvm, linux-kernel, drjones, pbonzini, maz
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;
}
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: arm64: selftests: Request PMU feature in get-reg-list
2021-05-13 11:14 ` Marc Zyngier
@ 2021-05-13 13:20 ` Gavin Shan
0 siblings, 0 replies; 3+ messages in thread
From: Gavin Shan @ 2021-05-13 13:20 UTC (permalink / raw)
To: Marc Zyngier; +Cc: kvmarm, kvm, linux-kernel, drjones, pbonzini
On 5/13/21 9:14 PM, Marc Zyngier wrote:
> 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
>
Thanks, Marc. Yes, Drew's series already had the fix.
Sorry about the noise and please ignore this.
Thanks,
Gavin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-13 11:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-05-13 13:20 ` Gavin Shan
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).