aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-10-27 07:14:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-10-27 07:14:40 -0400
commit153a971ff578e9c8c5eadc9463c1d73a6adc8693 (patch)
tree7413a2751ba9b656884902a78fc77b3d98fe5c1c /arch/x86
parent2b776b54bca8c6f3b3a37f89bd80863b688bd8dd (diff)
parent6fee2a0be0ecae939d4b6cd8297d88b5cbb61654 (diff)
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner: "Two fixes for the VMWare guest support: - Unbreak VMWare platform detection which got wreckaged by converting an integer constant to a string constant. - Fix the clang build of the VMWAre hypercall by explicitely specifying the ouput register for INL instead of using the short form" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/vmware: Fix platform detection VMWARE_PORT macro x86/cpu/vmware: Use the full form of INL in VMWARE_HYPERCALL, for clang/llvm
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/vmware.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h
index e00c9e875933..ac9fc51e2b18 100644
--- a/arch/x86/include/asm/vmware.h
+++ b/arch/x86/include/asm/vmware.h
@@ -4,6 +4,7 @@
4 4
5#include <asm/cpufeatures.h> 5#include <asm/cpufeatures.h>
6#include <asm/alternative.h> 6#include <asm/alternative.h>
7#include <linux/stringify.h>
7 8
8/* 9/*
9 * The hypercall definitions differ in the low word of the %edx argument 10 * The hypercall definitions differ in the low word of the %edx argument
@@ -20,8 +21,8 @@
20 */ 21 */
21 22
22/* Old port-based version */ 23/* Old port-based version */
23#define VMWARE_HYPERVISOR_PORT "0x5658" 24#define VMWARE_HYPERVISOR_PORT 0x5658
24#define VMWARE_HYPERVISOR_PORT_HB "0x5659" 25#define VMWARE_HYPERVISOR_PORT_HB 0x5659
25 26
26/* Current vmcall / vmmcall version */ 27/* Current vmcall / vmmcall version */
27#define VMWARE_HYPERVISOR_HB BIT(0) 28#define VMWARE_HYPERVISOR_HB BIT(0)
@@ -29,7 +30,8 @@
29 30
30/* The low bandwidth call. The low word of edx is presumed clear. */ 31/* The low bandwidth call. The low word of edx is presumed clear. */
31#define VMWARE_HYPERCALL \ 32#define VMWARE_HYPERCALL \
32 ALTERNATIVE_2("movw $" VMWARE_HYPERVISOR_PORT ", %%dx; inl (%%dx)", \ 33 ALTERNATIVE_2("movw $" __stringify(VMWARE_HYPERVISOR_PORT) ", %%dx; " \
34 "inl (%%dx), %%eax", \
33 "vmcall", X86_FEATURE_VMCALL, \ 35 "vmcall", X86_FEATURE_VMCALL, \
34 "vmmcall", X86_FEATURE_VMW_VMMCALL) 36 "vmmcall", X86_FEATURE_VMW_VMMCALL)
35 37
@@ -38,7 +40,8 @@
38 * HB and OUT bits set. 40 * HB and OUT bits set.
39 */ 41 */
40#define VMWARE_HYPERCALL_HB_OUT \ 42#define VMWARE_HYPERCALL_HB_OUT \
41 ALTERNATIVE_2("movw $" VMWARE_HYPERVISOR_PORT_HB ", %%dx; rep outsb", \ 43 ALTERNATIVE_2("movw $" __stringify(VMWARE_HYPERVISOR_PORT_HB) ", %%dx; " \
44 "rep outsb", \
42 "vmcall", X86_FEATURE_VMCALL, \ 45 "vmcall", X86_FEATURE_VMCALL, \
43 "vmmcall", X86_FEATURE_VMW_VMMCALL) 46 "vmmcall", X86_FEATURE_VMW_VMMCALL)
44 47
@@ -47,7 +50,8 @@
47 * HB bit set. 50 * HB bit set.
48 */ 51 */
49#define VMWARE_HYPERCALL_HB_IN \ 52#define VMWARE_HYPERCALL_HB_IN \
50 ALTERNATIVE_2("movw $" VMWARE_HYPERVISOR_PORT_HB ", %%dx; rep insb", \ 53 ALTERNATIVE_2("movw $" __stringify(VMWARE_HYPERVISOR_PORT_HB) ", %%dx; " \
54 "rep insb", \
51 "vmcall", X86_FEATURE_VMCALL, \ 55 "vmcall", X86_FEATURE_VMCALL, \
52 "vmmcall", X86_FEATURE_VMW_VMMCALL) 56 "vmmcall", X86_FEATURE_VMW_VMMCALL)
53#endif 57#endif