lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 30 Sep 2016 10:52:56 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Renat Valiullin <rvaliullin@...are.com>
cc:     Alok Kataria <akataria@...are.com>, Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/vmware: Skip lapic calibration on VMware.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ