Linux virtualization list
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Renat Valiullin <rvaliullin@vmware.com>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Alok Kataria <akataria@vmware.com>
Subject: Re: [PATCH] x86/vmware: Skip lapic calibration on VMware.
Date: Fri, 30 Sep 2016 10:52:56 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1609301023560.4799@nanos> (raw)
In-Reply-To: <9FDEBA6F-7CB2-4637-BFC7-EA336B97EDAD@vmware.com>

[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]

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 <rvaliullin@vmware.com>
> Acked-by: Alok N Kataria <akataria@vmware.com>
> ---
>  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

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

       reply	other threads:[~2016-09-30  8:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9FDEBA6F-7CB2-4637-BFC7-EA336B97EDAD@vmware.com>
2016-09-30  8:52 ` Thomas Gleixner [this message]
2016-10-04 20:11 [PATCH] x86/vmware: Skip lapic calibration on VMware Renat Valiullin
  -- strict thread matches above, loose matches on Subject: below --
2016-09-29 17:51 Renat Valiullin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1609301023560.4799@nanos \
    --to=tglx@linutronix.de \
    --cc=akataria@vmware.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rvaliullin@vmware.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox