From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch 5/5] PTP: add kvm PTP driver Date: Fri, 20 Jan 2017 11:11:53 -0200 Message-ID: <20170120131150.GB27440@amt.cnet> References: <20170120122025.665985919@redhat.com> <20170120122503.842086637@redhat.com> <86db90e2-a7fc-5868-20e5-13f2393f306b@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Radim Krcmar , Richard Cochran , Miroslav Lichvar To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <86db90e2-a7fc-5868-20e5-13f2393f306b@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Jan 20, 2017 at 01:58:33PM +0100, Paolo Bonzini wrote: > > > On 20/01/2017 13:20, Marcelo Tosatti wrote: > > + ret = kvm_hypercall2(KVM_HC_CLOCK_PAIRING, > > + clock_off_gpa, > > + KVM_CLOCK_PAIRING_WALLCLOCK); > > + if (ret != 0) { > > + pr_err("clock offset hypercall ret %lu\n", ret); > > + spin_unlock(&kvm_ptp_lock); > > + preempt_enable_notrace(); > > + return -EOPNOTSUPP; > > + } > > + > > Is it worth making this hypercall, or even all of ptp_kvm_get_time_fn, a > pv_ops entry? Well, i don't know how Xen is going to implement this. Maybe you can, when you have more low level implementations to be able to generalize. > But this looks good already, apart from my different preference on > emulate_ptp_sys_offset_mean. Sending v4 with the direct export of kvm clocksource. Thanks!