Re: [PATCH 5/5] KVM: arm64: Remove redundant call to kvm_pmu_vcpu_reset()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexandru,

On 12/1/20 4:01 PM, Alexandru Elisei wrote:
> KVM_ARM_VCPU_INIT ioctl calls kvm_reset_vcpu(), which in turn resets the
> PMU with a call to kvm_pmu_vcpu_reset(). The function zeroes the PMU
> chained counters bitmap and stops all the counters with a perf event
> attached. Because it is called before the VCPU has had the chance to run,
> no perf events are in use and none are released.
> 
> kvm_arm_pmu_v3_enable(), called by kvm_vcpu_first_run_init() only if the
> VCPU has not been initialized, also resets the PMU. kvm_pmu_vcpu_reset() in
This sounds strange to me. kvm_vcpu_first_run_init() only is called if
kvm_vcpu_initialized(vcpu) is true.
> this case does the exact same thing as the previous call, so remove it.
> 
> Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx>
> ---
>  arch/arm64/kvm/pmu-emul.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm64/kvm/pmu-emul.c b/arch/arm64/kvm/pmu-emul.c
> index 398f6df1bbe4..4ad66a532e38 100644
> --- a/arch/arm64/kvm/pmu-emul.c
> +++ b/arch/arm64/kvm/pmu-emul.c
> @@ -850,8 +850,6 @@ int kvm_arm_pmu_v3_enable(struct kvm_vcpu *vcpu)
>  		   return -EINVAL;
>  	}
>  
> -	kvm_pmu_vcpu_reset(vcpu);
> -
this patch does not apply for me (vcpu->arch.pmu.ready = true; ?)

Thanks

Eric
>  	return 0;
>  }
>  
> 

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux