Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5174442pxj; Wed, 26 May 2021 04:46:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN/nnLx2meIesONTbF2gcx2fDiDTq4maIknZVukVAq7SdXZ9wAH/oP4vPsocMcqXArK4dS X-Received: by 2002:a5d:9959:: with SMTP id v25mr25991220ios.85.1622029615937; Wed, 26 May 2021 04:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622029615; cv=none; d=google.com; s=arc-20160816; b=RVF940kbWwtKoKXi+vpHDk85+l49knhUmunhqhfmbWU4Gbgei1/lf+UL/xLHwnhMXA vgDjTp1XTBbVXox+4IoK6fmKreSYnEEPSAGA9gdMk7fJluTbZcpUnYZpFgD0s837kP/d u0WZbhvvLaaqVu33/sEyakCoW3wDHoz0SJ9P//HMFLJmSBS1+9HoS2GJ6eTFUN2f5SGv 2DPbMyosMBK0U+yj/dVYIuhoB8TNAxe3qp+5rjasfidMRwfQu7cK51LLRqZG2MWl5cYx hAPPiwq1CjJgrmx88t/aJC8aM6tXRijGR5k3TtJ6VWvRBRCab/ND+8pVNOqD0QU6vSIX jmAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=DF4Qym5vi5urmQVozT7x89feYVqRBLX860c1iUhsLiU=; b=BmfuQAKQLX0eKU9+eeJ1mjXmCeWP6Ag9ZBzQPOnK0Lr+pva8AgN/eyVlxINODvtq1r W6+aTfFSzupIv/A3K932UB4X35gKsXDl0fuvKeUdFx73DfSoIhmWKFSOQYFG1wavMEyo IUyv7sLulCt/ZFMbWuUo0XAxwjaPw59CPEjh4HlMow/RJS/6XpR5lyU4aw6YhgEuSRJE zYQ9U3ziy20+2WxHGMaJfAXmqSHcshl5lA4iWJwbF+Xp49Z5xcD2zjXu9Plt9MIf1TP5 cyiNi0O8DHMuW0sGF0BREVcMORia0aRxoB1a/+NKPzR7MMHV2R93EGmAJEgrVJsPbxoo crgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k64si20438638iof.43.2021.05.26.04.46.42; Wed, 26 May 2021 04:46:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232583AbhEZHy3 (ORCPT + 99 others); Wed, 26 May 2021 03:54:29 -0400 Received: from mail-ua1-f52.google.com ([209.85.222.52]:34546 "EHLO mail-ua1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhEZHyZ (ORCPT ); Wed, 26 May 2021 03:54:25 -0400 Received: by mail-ua1-f52.google.com with SMTP id x1so287942uau.1; Wed, 26 May 2021 00:52:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DF4Qym5vi5urmQVozT7x89feYVqRBLX860c1iUhsLiU=; b=YzPVqcY1EPZbaSCvOFGIgiiu8fiZbg23q0itrX0saQgR0RC2NdOe5weYcHR2TC1WUJ tj/RqrjAY0a6KwH5mM0ge2ust62kc9dqk6VTt7lgY7WJdBRcjzTnqV1FpkzvSnZ9eqiD Emgt/9b+ss1NCdhhnD4ZjNJ09d5pa7uuCZVOoLJziJMUBkwxW63KoYD+u3O5LosX/NaK Pwo1oh4Lm9Rj+GJ2GvWtWJWE8NXaQHF6ffRl5VaEzohtx0VOqXHh7KSt6pAgauYvdJSH tJlRD/4seN1HvODGVKrCm5zU6PTZmEVdfa3OxlwlTKtRwkddsrmAemtmeTaF1yGP0bf5 eK5A== X-Gm-Message-State: AOAM5324tQN9FLCLU9Z5CHomQvW2a/TzMdG8DOkLdnQCaYFN/khIz3tK veEJqwooJkfHglTTPgcH3tSUYvWrl7LzytuVDMk= X-Received: by 2002:a1f:9505:: with SMTP id x5mr26222492vkd.6.1622015574205; Wed, 26 May 2021 00:52:54 -0700 (PDT) MIME-Version: 1.0 References: <20210330145430.996981-1-maz@kernel.org> <20210330145430.996981-8-maz@kernel.org> <6c522f8116f54fa6f23a2d217d966c5a@kernel.org> In-Reply-To: <6c522f8116f54fa6f23a2d217d966c5a@kernel.org> From: Geert Uytterhoeven Date: Wed, 26 May 2021 09:52:42 +0200 Message-ID: Subject: Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 To: Marc Zyngier Cc: jianyong.wu@arm.com, netdev , Yangbo Lu , John Stultz , Thomas Gleixner , Paolo Bonzini , seanjc@google.com, Richard Cochran , Mark Rutland , Will Deacon , Suzuki K Poulose , Andre Przywara , Steven Price , Lorenzo Pieralisi , Sudeep Holla , Linux Kernel Mailing List , Linux ARM , kvmarm@lists.cs.columbia.edu, KVM list , Steve Capper , justin.he@arm.com, Android Kernel Team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On Tue, May 11, 2021 at 11:13 AM Marc Zyngier wrote: > On 2021-05-11 10:07, Geert Uytterhoeven wrote: > > On Tue, Mar 30, 2021 at 4:56 PM Marc Zyngier wrote: > >> From: Jianyong Wu > >> > >> Currently, there is no mechanism to keep time sync between guest and > >> host > >> in arm/arm64 virtualization environment. Time in guest will drift > >> compared > >> with host after boot up as they may both use third party time sources > >> to correct their time respectively. The time deviation will be in > >> order > >> of milliseconds. But in some scenarios,like in cloud environment, we > >> ask > >> for higher time precision. > >> > >> kvm ptp clock, which chooses the host clock source as a reference > >> clock to sync time between guest and host, has been adopted by x86 > >> which takes the time sync order from milliseconds to nanoseconds. > >> > >> This patch enables kvm ptp clock for arm/arm64 and improves clock sync > >> precision > >> significantly. > > > >> --- a/drivers/ptp/Kconfig > >> +++ b/drivers/ptp/Kconfig > >> @@ -108,7 +108,7 @@ config PTP_1588_CLOCK_PCH > >> config PTP_1588_CLOCK_KVM > >> tristate "KVM virtual PTP clock" > >> depends on PTP_1588_CLOCK > >> - depends on KVM_GUEST && X86 > >> + depends on (KVM_GUEST && X86) || (HAVE_ARM_SMCCC_DISCOVERY && > >> ARM_ARCH_TIMER) > > > > Why does this not depend on KVM_GUEST on ARM? > > I.e. shouldn't the dependency be: > > > > KVM_GUEST && (X86 || (HAVE_ARM_SMCCC_DISCOVERY && ARM_ARCH_TIMER)) > > > > ? > > arm/arm64 do not select KVM_GUEST. Any kernel can be used for a guest, > and KVM/arm64 doesn't know about this configuration symbol. OK. Does PTP_1588_CLOCK_KVM need to default to yes? Perhaps only on X86, to maintain the status quo? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds