# Re: \[PATCH v5 5/6\] ptp: arm64: Enable ptp\_kvm for arm64

- From: Paolo Bonzini \<pbonzini@redhat.com\>
- Date: 2019-10-15 16:39:39 
- List: netdev
- Page: https://ratatoskr.run/netdev/2019/10/5745326
- Thread: https://ratatoskr.run/netdev/2019/10/5744948/t.md

```text
On 15/10/19 12:48, Jianyong Wu wrote:
> +int kvm_arch_ptp_get_clock_generic(struct timespec64 *ts,
> +				   struct arm_smccc_res *hvc_res)
> +{
> +	u64 ns;
> +	ktime_t ktime_overall;
> +
> +	arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID,
> +				  hvc_res);
> +	if ((long)(hvc_res->a0) < 0)
> +		return -EOPNOTSUPP;
> +
> +	ktime_overall = hvc_res->a0 << 32 | hvc_res->a1;
> +	*ts = ktime_to_timespec64(ktime_overall);
> +
> +	return 0;
> +}
> +

This seems wrong, who uses kvm_arch_ptp_get_clock_fn?

Paolo

```
