[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWzBqLVOVn_z8S2H-x-kL+DfOsM5mDb_D8OKsyRJtKpdA@mail.gmail.com>
Date: Wed, 26 May 2021 09:52:42 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Marc Zyngier <maz@...nel.org>
Cc: jianyong.wu@....com, netdev <netdev@...r.kernel.org>,
Yangbo Lu <yangbo.lu@....com>,
John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Paolo Bonzini <pbonzini@...hat.com>, seanjc@...gle.com,
Richard Cochran <richardcochran@...il.com>,
Mark Rutland <Mark.Rutland@....com>,
Will Deacon <will@...nel.org>,
Suzuki K Poulose <suzuki.poulose@....com>,
Andre Przywara <Andre.Przywara@....com>,
Steven Price <steven.price@....com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Sudeep Holla <sudeep.holla@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
kvmarm@...ts.cs.columbia.edu, KVM list <kvm@...r.kernel.org>,
Steve Capper <Steve.Capper@....com>, justin.he@....com,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64
Hi Marc,
On Tue, May 11, 2021 at 11:13 AM Marc Zyngier <maz@...nel.org> wrote:
> On 2021-05-11 10:07, Geert Uytterhoeven wrote:
> > On Tue, Mar 30, 2021 at 4:56 PM Marc Zyngier <maz@...nel.org> wrote:
> >> From: Jianyong Wu <jianyong.wu@....com>
> >>
> >> 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@...ux-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
Powered by blists - more mailing lists