I believe our trademark guidelines say we aren't supposed to use VMware as a noun to mean a product, only to mean the company. So we can say "running on VMware ESXi" or "running in a VMware virtual machine", but "running on VMware" is wrong. There is supposedly some good legal reason for this related to keeping our trademark. On Tue, 25 Oct 2016 22:26:00 -0700, Alexey Makhalov <amakhalov at vmware.com> wrote:> Add basic paravirt support: > 1. set pv_info.name to "VMware" to have proper boot log message > Booting paravirtualized kernel on VMware > instead of "... on bare hardware" > 2. set pv_cpu_ops.io_delay() to empty function - paravirt_nop() to > avoid vm-exits on IO delays. > > Signed-off-by: Alexey Makhalov <amakhalov at vmware.com> > Acked-by: Alok N Kataria <akataria at vmware.com> > --- > arch/x86/kernel/cpu/vmware.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c > index 480790f..e3fb320 100644 > --- a/arch/x86/kernel/cpu/vmware.c > +++ b/arch/x86/kernel/cpu/vmware.c > @@ -61,6 +61,16 @@ static unsigned long vmware_get_tsc_khz(void) > return vmware_tsc_khz; > } > > +#ifdef CONFIG_PARAVIRT > +static void __init vmware_paravirt_ops_setup(void) > +{ > + pv_info.name = "VMware"; > + pv_cpu_ops.io_delay = paravirt_nop; > +} > +#else > +#define vmware_paravirt_ops_setup() do {} while (0) > +#endif > + > static void __init vmware_platform_setup(void) > { > uint32_t eax, ebx, ecx, edx; > @@ -94,6 +104,8 @@ static void __init vmware_platform_setup(void) > } else { > pr_warn("Failed to get TSC freq from the hypervisor\n"); > } > + > + vmware_paravirt_ops_setup(); > } > > /*-- Tim Mann | work: mann at vmware.com home: tim at tim-mann.org VMware Sr. Staff Engineer | http://www.vmware.com http://tim-mann.org
Thomas Gleixner
2016-Oct-26 20:47 UTC
[PATCH 2/3] x86/vmware: Add basic paravirt ops support
On Wed, 26 Oct 2016, Tim Mann wrote:> I believe our trademark guidelines say we aren't supposed to use VMware as a > noun to mean a product, only to mean the company. So we can say "running on > VMware ESXi" or "running in a VMware virtual machine", but "running on VMware" > is wrong. There is supposedly some good legal reason for this related to > keeping our trademark.Please sort that out internally and resend the whole lot when this is resolved. Thanks, tglx
Alexey Makhalov
2016-Oct-27 19:44 UTC
[RESEND PATCH 1/3] x86/vmware: Use tsc_khz value for calibrate_cpu()
After aa297292d708, there are separate native calibrations for cpu_khz and tsc_khz. The code sets x86_platform.calibrate_cpu to native_calibrate_cpu() which looks in cpuid leaf 0x16 or msrs for the cpu frequency. Since we keep the tsc_khz constant (even after vmotion), the cpu_khz and tsc_khz may start diverging. tsc_init() now does cpu_khz = x86_platform.calibrate_cpu(); tsc_khz = x86_platform.calibrate_tsc(); if (tsc_khz == 0) tsc_khz = cpu_khz; else if (abs(cpu_khz - tsc_khz) * 10 > tsc_khz) cpu_khz = tsc_khz; We want the cpu_khz and tsc_khz to be sync even if they diverge less then 10%. This patch resolves this issue by setting x86_platform.calibrate_cpu to vmware_get_tsc_khz(). Signed-off-by: Alexey Makhalov <amakhalov at vmware.com> Acked-by: Alok N Kataria <akataria at vmware.com> --- arch/x86/kernel/cpu/vmware.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index 4e34da4b..480790f 100644 --- a/arch/x86/kernel/cpu/vmware.c +++ b/arch/x86/kernel/cpu/vmware.c @@ -83,6 +83,7 @@ static void __init vmware_platform_setup(void) vmware_tsc_khz = tsc_khz; x86_platform.calibrate_tsc = vmware_get_tsc_khz; + x86_platform.calibrate_cpu = vmware_get_tsc_khz; #ifdef CONFIG_X86_LOCAL_APIC /* Skip lapic calibration since we know the bus frequency. */ -- 2.10.1