From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH] x86/vmware: Skip lapic calibration on VMware. Date: Fri, 30 Sep 2016 10:52:56 +0200 (CEST) Message-ID: References: <9FDEBA6F-7CB2-4637-BFC7-EA336B97EDAD@vmware.com> Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1159237027-1475224214=:4799" Return-path: In-Reply-To: <9FDEBA6F-7CB2-4637-BFC7-EA336B97EDAD@vmware.com> Content-ID: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Renat Valiullin Cc: "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , Ingo Molnar , "H. Peter Anvin" , Alok Kataria List-Id: virtualization@lists.linuxfoundation.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1159237027-1475224214=:4799 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: 8BIT Content-ID: On Thu, 29 Sep 2016, Renat Valiullin wrote: > In virtualized environment the APIC timer calibration could go wrong > when the host is overcommitted or the guest is running nested, > this would result in the APIC timers operating at an incorrect frequency. > Since VMware supports a mechanism to retrieve the local APIC frequency > we can ask the hypervisor for it and skip this APIC calibration loop. > > Signed-off-by: Renat Valiullin > Acked-by: Alok N Kataria > --- > arch/x86/kernel/cpu/vmware.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) Please fix your mail client so it does not mangle the patch into DOS format. Aside of that it's white space mangled, i.e. the tabs are converted to spaces. Please send your patch to yourself, export it to a mbox and apply it with git am. > - if (ebx != UINT_MAX) > + if (ebx != UINT_MAX) { > x86_platform.calibrate_tsc = vmware_get_tsc_khz; > - else > +#ifdef CONFIG_X86_LOCAL_APIC > + /* Skip lapic calibration since we know the bus frequency. */ > + lapic_timer_frequency = ecx / HZ; > + pr_info("Host bus clock speed read from hypervisor : %u Hz\n", > + ecx); > +#endif > + } else > pr_warn("Failed to get TSC freq from the hypervisor\n"); Please add braces around this as well. See Documentation/Codingstyle Thanks, tglx --8323329-1159237027-1475224214=:4799 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization --8323329-1159237027-1475224214=:4799--