Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3344169pxj; Tue, 11 May 2021 02:15:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwthvdc8AJ9Gij8p4JX4a3ISdjcy9x4cXxHlr6aP+Y2aVokKRKJMf/qWs3jenGVqHWt6h3y X-Received: by 2002:a02:6905:: with SMTP id e5mr25099823jac.30.1620724530853; Tue, 11 May 2021 02:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620724530; cv=none; d=google.com; s=arc-20160816; b=bCJ1318tZWNgbBjfb/b7hsi7zfLn0UCUmjiTsY9mYQa775AO0yFozes3rN+KFeQJwd kj35VEvD+w0wDvklA9ZTmgNUO3iLy2EDjcIgEBHZ2A3uT62L44GFeJF9Rtn3OxYioSV/ 1q7C3UiPPLkiYe6nDZtDFXJyjNv3GMua4riiE/pQ1N9VxVMbe34N2nued4QCvQbpdGnJ yAd4Aj/PzmGPzTNsKGTIiQ7JFDzCrMzkTp6u1TaO7zlLTD3ztnPk2EbPK8OHVXqPT3co 7d6EOp5ecfnsj/EYVCY2aqAP0uAD7CbZpDjKs4lvOvhd6ljD2D+lmuoKT5082+X7Wgbs LbjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version; bh=CkZh1MjrKpoJcfLBJ/I7fEfMr9NcCFMAtSff1rVHSF0=; b=Th82k11D3Q+PpIyVKuXOvaLysmXqciaTZUwJ0DjpShHYaZh1Wlj0WXEey03L12ZgWq F9rk6NOk/fIHzwrlMukRi+wJ/SdLaBceMzCi3nzKaxlqJ/ztgNvomhXOTNw67qKg9Zaz q7YdHjIChP3xmBrJh3HsCUtVkKgN3Y9xY2ezGNRGmWKsV1ywbw+h0qRp0MX/1xvgUjiZ se9btvU4rYOp2ZMVWFp0cvgSyjt+suy+3nKDMpUfRUhU3/hqTdPEClmpAEqX+pqa5oZ5 UqxZdSY4aBk4k1l/Ip5K31E3rZa2Jo4yP5AB9MhRMuZ/0uetLojoZdj6WtmuziiWKqfF SO6A== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si16115695jaj.54.2021.05.11.02.15.18; Tue, 11 May 2021 02:15:30 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231310AbhEKJOM (ORCPT + 99 others); Tue, 11 May 2021 05:14:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:36270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbhEKJOM (ORCPT ); Tue, 11 May 2021 05:14:12 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D04616157F; Tue, 11 May 2021 09:13:05 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1lgORr-000doA-Os; Tue, 11 May 2021 10:13:03 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 11 May 2021 10:13:03 +0100 From: Marc Zyngier To: Geert Uytterhoeven 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 Subject: Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 In-Reply-To: References: <20210330145430.996981-1-maz@kernel.org> <20210330145430.996981-8-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <6c522f8116f54fa6f23a2d217d966c5a@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: geert@linux-m68k.org, jianyong.wu@arm.com, netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, seanjc@google.com, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, Andre.Przywara@arm.com, steven.price@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve.Capper@arm.com, justin.he@arm.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On 2021-05-11 10:07, Geert Uytterhoeven wrote: > 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)) > > ? 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. Thanks, M. -- Jazz is not dead. It just smells funny...