From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751402AbdAPPsT (ORCPT ); Mon, 16 Jan 2017 10:48:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34346 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbdAPPsR (ORCPT ); Mon, 16 Jan 2017 10:48:17 -0500 Date: Mon, 16 Jan 2017 16:48:15 +0100 From: Radim Krcmar To: Richard Cochran Cc: Marcelo Tosatti , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Miroslav Lichvar Subject: Re: [patch 3/3] PTP: add kvm PTP driver Message-ID: <20170116154814.GA31452@potion> References: <20170113120131.086634482@redhat.com> <20170113120319.777765254@redhat.com> <20170113155657.GD22440@potion> <20170114152636.GA16883@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170114152636.GA16883@localhost.localdomain> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 16 Jan 2017 15:48:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-01-14 16:26+0100, Richard Cochran: > On Fri, Jan 13, 2017 at 04:56:58PM +0100, Radim Krcmar wrote: >> > +static int __init ptp_kvm_init(void) >> > +{ >> > + if (!kvm_para_available()) >> > + return -ENODEV; >> > + >> > + kvm_ptp_clock.caps = ptp_kvm_caps; >> > + >> > + kvm_ptp_clock.ptp_clock = ptp_clock_register(&kvm_ptp_clock.caps, NULL); >> >> It is a shame that the infrastructure uses polling when the guest could >> be notified on every host real time change, but this should be good >> enough. > > This comment makes no sense at all. What do you mean by "host real > time change"? Real time in the sense of wall clock, as perceived by the host, and the change of that time. Unlike other PTP drivers, host (source) and guest (destination) share the same hardware clock, so they cannot shift or drift unless one of them changes its "TSC to real time" conversion (the host is most likely using NTP/PTP to keep its own real time). I meant that the host could notify the guest when a change happens, which would be more efficient.