x86/vmware: Update platform detection code for VMCALL/VMMCALL hypercalls
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 28 Aug 2019 08:03:50 +0000 (10:03 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 28 Aug 2019 08:48:30 +0000 (10:48 +0200)
commitbac7b4e843232a3a49a042410cf743341eb0887e
treed0d1eb55219dc73b4358dc354194f26091822b3b
parenta55aa89aab90fae7c815b0551b07be37db359d76
x86/vmware: Update platform detection code for VMCALL/VMMCALL hypercalls

Vmware has historically used an INL instruction for this, but recent
hardware versions support using VMCALL/VMMCALL instead, so use this
method if supported at platform detection time. Explicitly code separate
macro versions since the alternatives self-patching has not been
performed at platform detection time.

Also put tighter constraints on the assembly input parameters.

Co-developed-by: Doug Covelli <dcovelli@vmware.com>
Signed-off-by: Doug Covelli <dcovelli@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Doug Covelli <dcovelli@vmware.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-graphics-maintainer@vmware.com
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: virtualization@lists.linux-foundation.org
Cc: <pv-drivers@vmware.com>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190828080353.12658-2-thomas_os@shipmail.org
arch/x86/kernel/cpu/vmware.c