Commit 91d1e54e authored by Alexey Makhalov's avatar Alexey Makhalov Committed by Thomas Gleixner

x86/vmware: Add basic paravirt ops support

Add basic paravirt support:

 1. Set pv_info.name to "VMware hypervisor" to have proper boot log message
	Booting paravirtualized kernel on VMware hypervisor
    instead of "... on bare hardware"

 2. Set pv_cpu_ops.io_delay() to empty function - paravirt_noop() to
    avoid vm-exits on IO delays because io delays they are not required.
Signed-off-by: default avatarAlexey Makhalov <amakhalov@vmware.com>
Acked-by: default avatarAlok N Kataria <akataria@vmware.com>
Cc: linux-doc@vger.kernel.org
Cc: pv-drivers@vmware.com
Cc: corbet@lwn.net
Cc: virtualization@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/20161028075432.90579-3-amakhalov@vmware.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 687bca8d
......@@ -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 hypervisor";
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();
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment