Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3340244pxj; Tue, 11 May 2021 02:09:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgTbhPl42CWrnQfWo4AaLl0KCOEYS8b19hyO8yFHva1P9RTUEIDA27kNiYvXMKKFUQTVw6 X-Received: by 2002:a5d:88cf:: with SMTP id i15mr21443541iol.45.1620724150472; Tue, 11 May 2021 02:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620724150; cv=none; d=google.com; s=arc-20160816; b=lrnva6aV+uUTweEab+YqVWecKABUTqHHnZOgVct99EgLDBBws2L78fX3dAM6ltdoYb XAvasBIkHJndzqaKiGWhstkbur2ZIbqBEBsiLbvDkk81afz7ggt+xF6lAJjqApkDvEGP Jk+rAoA2KgSR12qsuooDvHumdBuh28poWmG2+BMJJ8okZjpMgoLL4dPAaMfOPbYUdurh Ei5RUWCGPdh3RXw6W101GI5QUEwIwTMqgNtwuTyjSIn+DF3fHGS2GFfVMyt7Rcec73Fq nBjD8x95GYZsVZXy4C720z0g2IkXyr6rW5xddyJH7Vb/Rj1eXBh06H57ce89ZbNEJarE e3/w== 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=VWZENhS44KnEbYhJ55uNu4C5dSY972Eyg88PLcY/zho=; b=K2IDwu1feO6/QsJURWL/WXyX+BeTicHTSmqP2UrhUW6M/r+hgjN2EihrCpYuR/R52F vVRtDppKrzuQ5P0M/Lm6Rxyww+K/lA2p4+VkOJSo9O6njT6Q6oNIjJle9exn9qAs3cyT 91HZ17olFZbE+NvznF5hcDxEe2+9ky8Gg9pL2RfB7cVdEy/YDvUGEipKsfHz4gyuG+1E dMJdmE6VvVgcgDosK8rBqEfpzIYdzu6ki3g1MRmaIxqPocTHCBQu4UhLvfixpE29BmQF 1UHCL1N/TCR+eN00ge/Rfioy11oJaIIWdw47lyrMB+GMYNgfkTFbjKVYQzICQvN5xzuj UZGA== 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 w4si20881178ilq.56.2021.05.11.02.08.57; Tue, 11 May 2021 02:09:10 -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 S231239AbhEKJJT (ORCPT + 99 others); Tue, 11 May 2021 05:09:19 -0400 Received: from mail-vs1-f52.google.com ([209.85.217.52]:45980 "EHLO mail-vs1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231189AbhEKJJS (ORCPT ); Tue, 11 May 2021 05:09:18 -0400 Received: by mail-vs1-f52.google.com with SMTP id x188so4253750vsx.12; Tue, 11 May 2021 02:08:11 -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=VWZENhS44KnEbYhJ55uNu4C5dSY972Eyg88PLcY/zho=; b=ZYteCF6VMnbzLPAL9iAFHg4dIeYly3O1jQ5AW5JJ2oPvkDf9qaHUYPPSTqgNsxT5sH z3T+D/pKNKeSsu6YOS9dBxElcxnKDvYdOPgcyDCb/u+Rjyfpj745mOZI32j9IjihwyUr 18QVNg5hgXGFGwhICErwrs1obuxQToEcdsLOybILakDy3FOXo5qg9Unde5N9jpGNBfOg ksriRNSbrosR5iE6bMuQAlm+SInUEV4H0lm9pFhk+oCD0yP23p/y3/6M5kGXwnXTYgNz 2yQHWt/hx0eOG6fgVYxpn8Wuy1dv/f+HlL2gT5ilUwr//ZgxrlhnrNooAhGHlRhAGFyS YgiQ== X-Gm-Message-State: AOAM532nrO/G0LpWV4ZfZEqMlg+EpjJ40uVfT8BX5GGt+EPxoDpKK11r EdBs9u0cwCTCCcNf2gDYQKoQKiMkGjRtKiOxI+M= X-Received: by 2002:a67:3113:: with SMTP id x19mr17992653vsx.40.1620724090696; Tue, 11 May 2021 02:08:10 -0700 (PDT) MIME-Version: 1.0 References: <20210330145430.996981-1-maz@kernel.org> <20210330145430.996981-8-maz@kernel.org> In-Reply-To: <20210330145430.996981-8-maz@kernel.org> From: Geert Uytterhoeven Date: Tue, 11 May 2021 11:07:59 +0200 Message-ID: Subject: Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 To: Marc Zyngier , jianyong.wu@arm.com Cc: 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, Jianyong, 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)) ? > default y > help > This driver adds support for using kvm infrastructure as a PTP 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