From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754504AbcBWSKy (ORCPT ); Tue, 23 Feb 2016 13:10:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:53870 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753279AbcBWSKx (ORCPT ); Tue, 23 Feb 2016 13:10:53 -0500 Date: Tue, 23 Feb 2016 19:10:51 +0100 From: "Luis R. Rodriguez" To: David Vrabel Cc: "Luis R. Rodriguez" , bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au, xen-devel@lists.xensource.com, x86@kernel.org, linux-kernel@vger.kernel.org, luto@amacapital.net, lguest@lists.ozlabs.org, boris.ostrovsky@oracle.com Subject: Re: [Xen-devel] [PATCH v3 10/11] x86/rtc: replace paravirt rtc check with x86 specific solution Message-ID: <20160223181051.GG25240@wotan.suse.de> References: <1456212255-23959-1-git-send-email-mcgrof@kernel.org> <1456212255-23959-11-git-send-email-mcgrof@kernel.org> <56CC491C.8080505@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56CC491C.8080505@citrix.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 23, 2016 at 11:57:16AM +0000, David Vrabel wrote: > On 23/02/16 07:24, Luis R. Rodriguez wrote: > > --- a/arch/x86/xen/enlighten.c > > +++ b/arch/x86/xen/enlighten.c > [...] > > @@ -1526,8 +1525,6 @@ asmlinkage __visible void __init xen_start_kernel(void) > > > > /* Install Xen paravirt ops */ > > pv_info = xen_info; > > - if (xen_initial_domain()) > > - pv_info.features |= PV_SUPPORTED_RTC; > > pv_init_ops = xen_init_ops; > > if (!xen_pvh_domain()) { > > pv_cpu_ops = xen_cpu_ops; > > diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c > > index a0a4e554c6f1..fbfcb01015f0 100644 > > --- a/arch/x86/xen/time.c > > +++ b/arch/x86/xen/time.c > > @@ -446,8 +446,10 @@ void __init xen_init_time_ops(void) > > x86_platform.calibrate_tsc = xen_tsc_khz; > > x86_platform.get_wallclock = xen_get_wallclock; > > /* Dom0 uses the native method to set the hardware RTC. */ > > - if (!xen_initial_domain()) > > + if (!xen_initial_domain()) { > > + x86_init.platform_flags |= X86_PLATFORM_NO_RTC; > > x86_platform.set_wallclock = xen_set_wallclock; > > + } > > } > > Is this an early enough point to set this flag? I'm glad you asked, I should have explained how I confirmed this on the commit log as well. The answer is yes, even though I haven't tested it, but logically I've confirmed this given that rtc is initialized via device_initcall(add_rtc_cmos); -- these get called late in boot, way after setup_arch() during rest_init(). Luis