linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT
@ 2019-10-07 19:21 Sami Tolvanen
  2019-10-07 19:29 ` Thomas Hellstrom
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Sami Tolvanen @ 2019-10-07 19:21 UTC (permalink / raw)
  To: Thomas Hellstrom, pv-drivers, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov
  Cc: hpa, Kees Cook, x86, virtualization, linux-kernel,
	clang-built-linux, Sami Tolvanen

LLVM's assembler doesn't accept the short form inl (%%dx) instruction,
but instead insists on the output register to be explicitly specified:

  <inline asm>:1:7: error: invalid operand for instruction
          inl (%dx)
             ^
  LLVM ERROR: Error parsing inline asm

Use the full form of the instruction to fix the build.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
---
 arch/x86/kernel/cpu/vmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 9735139cfdf8..46d732696c1c 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -49,7 +49,7 @@
 #define VMWARE_CMD_VCPU_RESERVED 31
 
 #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)				\
-	__asm__("inl (%%dx)" :						\
+	__asm__("inl (%%dx), %%eax" :					\
 		"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :		\
 		"a"(VMWARE_HYPERVISOR_MAGIC),				\
 		"c"(VMWARE_CMD_##cmd),					\
-- 
2.23.0.581.g78d2f28ef7-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT
  2019-10-07 19:21 [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT Sami Tolvanen
@ 2019-10-07 19:29 ` Thomas Hellstrom
  2019-10-07 19:57 ` Nick Desaulniers
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Hellstrom @ 2019-10-07 19:29 UTC (permalink / raw)
  To: Sami Tolvanen, Pv-drivers, Thomas Gleixner, Ingo Molnar, Borislav Petkov
  Cc: hpa, Kees Cook, x86, virtualization, linux-kernel, clang-built-linux

On 10/7/19 9:21 PM, Sami Tolvanen wrote:
> LLVM's assembler doesn't accept the short form inl (%%dx) instruction,
> but instead insists on the output register to be explicitly specified:
>
>   <inline asm>:1:7: error: invalid operand for instruction
>           inl (%dx)
>              ^
>   LLVM ERROR: Error parsing inline asm
>
> Use the full form of the instruction to fix the build.
>
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

Acked-by: Thomas Hellstrom <thellstrom@vmware.com>

> ---
>  arch/x86/kernel/cpu/vmware.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
> index 9735139cfdf8..46d732696c1c 100644
> --- a/arch/x86/kernel/cpu/vmware.c
> +++ b/arch/x86/kernel/cpu/vmware.c
> @@ -49,7 +49,7 @@
>  #define VMWARE_CMD_VCPU_RESERVED 31
>  
>  #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)				\
> -	__asm__("inl (%%dx)" :						\
> +	__asm__("inl (%%dx), %%eax" :					\
>  		"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :		\
>  		"a"(VMWARE_HYPERVISOR_MAGIC),				\
>  		"c"(VMWARE_CMD_##cmd),					\



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT
  2019-10-07 19:21 [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT Sami Tolvanen
  2019-10-07 19:29 ` Thomas Hellstrom
@ 2019-10-07 19:57 ` Nick Desaulniers
  2019-10-08  0:44 ` Kees Cook
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nick Desaulniers @ 2019-10-07 19:57 UTC (permalink / raw)
  To: Sami Tolvanen
  Cc: Thomas Hellstrom, pv-drivers, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, H. Peter Anvin, Kees Cook,
	maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	virtualization, LKML, clang-built-linux

On Mon, Oct 7, 2019 at 12:21 PM 'Sami Tolvanen' via Clang Built Linux
<clang-built-linux@googlegroups.com> wrote:
>
> LLVM's assembler doesn't accept the short form inl (%%dx) instruction,
> but instead insists on the output register to be explicitly specified:
>
>   <inline asm>:1:7: error: invalid operand for instruction
>           inl (%dx)
>              ^
>   LLVM ERROR: Error parsing inline asm
>
> Use the full form of the instruction to fix the build.
>
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

Thanks Sami, this looks like it addresses:
Link: https://github.com/ClangBuiltLinux/linux/issues/734
Looks like GAS' testsuite has some cases where the second operand is
indeed implicitly %eax if unspecified. (This should still be fixed in
Clang).
Just to triple check that they're equivalent:
$ cat inl.s
  inl (%dx)
  inl (%dx), %eax
$ as inl.s
$ objdump -d a.out

a.out:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <.text>:
   0: ed                    in     (%dx),%eax
   1: ed                    in     (%dx),%eax

Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  arch/x86/kernel/cpu/vmware.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
> index 9735139cfdf8..46d732696c1c 100644
> --- a/arch/x86/kernel/cpu/vmware.c
> +++ b/arch/x86/kernel/cpu/vmware.c
> @@ -49,7 +49,7 @@
>  #define VMWARE_CMD_VCPU_RESERVED 31
>
>  #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)                           \
> -       __asm__("inl (%%dx)" :                                          \
> +       __asm__("inl (%%dx), %%eax" :                                   \
>                 "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :            \
>                 "a"(VMWARE_HYPERVISOR_MAGIC),                           \
>                 "c"(VMWARE_CMD_##cmd),                                  \

-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT
  2019-10-07 19:21 [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT Sami Tolvanen
  2019-10-07 19:29 ` Thomas Hellstrom
  2019-10-07 19:57 ` Nick Desaulniers
@ 2019-10-08  0:44 ` Kees Cook
  2019-10-08  9:59 ` [tip: x86/urgent] x86/cpu/vmware: Use " tip-bot2 for Sami Tolvanen
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kees Cook @ 2019-10-08  0:44 UTC (permalink / raw)
  To: Sami Tolvanen
  Cc: Thomas Hellstrom, pv-drivers, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, hpa, x86, virtualization, linux-kernel,
	clang-built-linux

On Mon, Oct 07, 2019 at 12:21:29PM -0700, Sami Tolvanen wrote:
> LLVM's assembler doesn't accept the short form inl (%%dx) instruction,
> but instead insists on the output register to be explicitly specified:
> 
>   <inline asm>:1:7: error: invalid operand for instruction
>           inl (%dx)
>              ^
>   LLVM ERROR: Error parsing inline asm
> 
> Use the full form of the instruction to fix the build.
> 
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

> ---
>  arch/x86/kernel/cpu/vmware.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
> index 9735139cfdf8..46d732696c1c 100644
> --- a/arch/x86/kernel/cpu/vmware.c
> +++ b/arch/x86/kernel/cpu/vmware.c
> @@ -49,7 +49,7 @@
>  #define VMWARE_CMD_VCPU_RESERVED 31
>  
>  #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)				\
> -	__asm__("inl (%%dx)" :						\
> +	__asm__("inl (%%dx), %%eax" :					\
>  		"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :		\
>  		"a"(VMWARE_HYPERVISOR_MAGIC),				\
>  		"c"(VMWARE_CMD_##cmd),					\
> -- 
> 2.23.0.581.g78d2f28ef7-goog
> 

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [tip: x86/urgent] x86/cpu/vmware: Use the full form of inl in VMWARE_PORT
  2019-10-07 19:21 [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT Sami Tolvanen
                   ` (2 preceding siblings ...)
  2019-10-08  0:44 ` Kees Cook
@ 2019-10-08  9:59 ` tip-bot2 for Sami Tolvanen
  2019-10-08  9:59 ` tip-bot2 for Sami Tolvanen
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tip-bot2 for Sami Tolvanen @ 2019-10-08  9:59 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sami Tolvanen, Borislav Petkov, Nick Desaulniers, Kees Cook,
	Thomas Hellstrom, clang-built-linux, H. Peter Anvin, Ingo Molnar,
	Thomas Gleixner, virtualization, VMware, Inc.,
	x86-ml, Ingo Molnar, Borislav Petkov, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     b547c1fa97b030ac50586e8b187571b4a83d154c
Gitweb:        https://git.kernel.org/tip/b547c1fa97b030ac50586e8b187571b4a83d154c
Author:        Sami Tolvanen <samitolvanen@google.com>
AuthorDate:    Mon, 07 Oct 2019 12:21:29 -07:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 08 Oct 2019 11:52:35 +02:00

x86/cpu/vmware: Use the full form of inl in VMWARE_PORT

LLVM's assembler doesn't accept the short form

  inl (%%dx)

instruction, but instead insists on the output register to be explicitly
specified:

  <inline asm>:1:7: error: invalid operand for instruction
          inl (%dx)
             ^
  LLVM ERROR: Error parsing inline asm

Use the full form of the instruction to fix the build.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Cc: clang-built-linux@googlegroups.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: virtualization@lists.linux-foundation.org
Cc: "VMware, Inc." <pv-drivers@vmware.com>
Cc: x86-ml <x86@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/734
Link: https://lkml.kernel.org/r/20191007192129.104336-1-samitolvanen@google.com
---
 arch/x86/kernel/cpu/vmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 9735139..46d7326 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -49,7 +49,7 @@
 #define VMWARE_CMD_VCPU_RESERVED 31
 
 #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)				\
-	__asm__("inl (%%dx)" :						\
+	__asm__("inl (%%dx), %%eax" :					\
 		"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :		\
 		"a"(VMWARE_HYPERVISOR_MAGIC),				\
 		"c"(VMWARE_CMD_##cmd),					\

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [tip: x86/urgent] x86/cpu/vmware: Use the full form of inl in VMWARE_PORT
  2019-10-07 19:21 [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT Sami Tolvanen
                   ` (3 preceding siblings ...)
  2019-10-08  9:59 ` [tip: x86/urgent] x86/cpu/vmware: Use " tip-bot2 for Sami Tolvanen
@ 2019-10-08  9:59 ` tip-bot2 for Sami Tolvanen
  2019-10-08 11:33 ` [tip: x86/urgent] x86/cpu/vmware: Use the full form of INL " tip-bot2 for Sami Tolvanen
  2019-10-08 11:33 ` tip-bot2 for Sami Tolvanen
  6 siblings, 0 replies; 8+ messages in thread
From: tip-bot2 for Sami Tolvanen @ 2019-10-08  9:59 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sami Tolvanen, Borislav Petkov, Nick Desaulniers, Kees Cook,
	Thomas Hellstrom, clang-built-linux, H. Peter Anvin, Ingo Molnar,
	Thomas Gleixner, virtualization, VMware, Inc.,
	x86-ml, Ingo Molnar, Borislav Petkov, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     b547c1fa97b030ac50586e8b187571b4a83d154c
Gitweb:        https://git.kernel.org/tip/b547c1fa97b030ac50586e8b187571b4a83d154c
Author:        Sami Tolvanen <samitolvanen@google.com>
AuthorDate:    Mon, 07 Oct 2019 12:21:29 -07:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 08 Oct 2019 11:52:35 +02:00

x86/cpu/vmware: Use the full form of inl in VMWARE_PORT

LLVM's assembler doesn't accept the short form

  inl (%%dx)

instruction, but instead insists on the output register to be explicitly
specified:

  <inline asm>:1:7: error: invalid operand for instruction
          inl (%dx)
             ^
  LLVM ERROR: Error parsing inline asm

Use the full form of the instruction to fix the build.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Cc: clang-built-linux@googlegroups.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: virtualization@lists.linux-foundation.org
Cc: "VMware, Inc." <pv-drivers@vmware.com>
Cc: x86-ml <x86@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/734
Link: https://lkml.kernel.org/r/20191007192129.104336-1-samitolvanen@google.com
---
 arch/x86/kernel/cpu/vmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 9735139..46d7326 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -49,7 +49,7 @@
 #define VMWARE_CMD_VCPU_RESERVED 31
 
 #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)				\
-	__asm__("inl (%%dx)" :						\
+	__asm__("inl (%%dx), %%eax" :					\
 		"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :		\
 		"a"(VMWARE_HYPERVISOR_MAGIC),				\
 		"c"(VMWARE_CMD_##cmd),					\

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [tip: x86/urgent] x86/cpu/vmware: Use the full form of INL in VMWARE_PORT
  2019-10-07 19:21 [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT Sami Tolvanen
                   ` (4 preceding siblings ...)
  2019-10-08  9:59 ` tip-bot2 for Sami Tolvanen
@ 2019-10-08 11:33 ` tip-bot2 for Sami Tolvanen
  2019-10-08 11:33 ` tip-bot2 for Sami Tolvanen
  6 siblings, 0 replies; 8+ messages in thread
From: tip-bot2 for Sami Tolvanen @ 2019-10-08 11:33 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sami Tolvanen, Borislav Petkov, Nick Desaulniers, Kees Cook,
	Thomas Hellstrom, clang-built-linux, H. Peter Anvin, Ingo Molnar,
	Thomas Gleixner, virtualization, VMware, Inc.,
	x86-ml, Ingo Molnar, Borislav Petkov, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     fbcfb8f0270bf24fe348393540b17a7f2ba577d7
Gitweb:        https://git.kernel.org/tip/fbcfb8f0270bf24fe348393540b17a7f2ba577d7
Author:        Sami Tolvanen <samitolvanen@google.com>
AuthorDate:    Mon, 07 Oct 2019 12:21:29 -07:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 08 Oct 2019 13:26:42 +02:00

x86/cpu/vmware: Use the full form of INL in VMWARE_PORT

LLVM's assembler doesn't accept the short form INL instruction:

  inl (%%dx)

but instead insists on the output register to be explicitly specified:

  <inline asm>:1:7: error: invalid operand for instruction
          inl (%dx)
             ^
  LLVM ERROR: Error parsing inline asm

Use the full form of the instruction to fix the build.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Cc: clang-built-linux@googlegroups.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: virtualization@lists.linux-foundation.org
Cc: "VMware, Inc." <pv-drivers@vmware.com>
Cc: x86-ml <x86@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/734
Link: https://lkml.kernel.org/r/20191007192129.104336-1-samitolvanen@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/vmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 9735139..46d7326 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -49,7 +49,7 @@
 #define VMWARE_CMD_VCPU_RESERVED 31
 
 #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)				\
-	__asm__("inl (%%dx)" :						\
+	__asm__("inl (%%dx), %%eax" :					\
 		"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :		\
 		"a"(VMWARE_HYPERVISOR_MAGIC),				\
 		"c"(VMWARE_CMD_##cmd),					\

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [tip: x86/urgent] x86/cpu/vmware: Use the full form of INL in VMWARE_PORT
  2019-10-07 19:21 [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT Sami Tolvanen
                   ` (5 preceding siblings ...)
  2019-10-08 11:33 ` [tip: x86/urgent] x86/cpu/vmware: Use the full form of INL " tip-bot2 for Sami Tolvanen
@ 2019-10-08 11:33 ` tip-bot2 for Sami Tolvanen
  6 siblings, 0 replies; 8+ messages in thread
From: tip-bot2 for Sami Tolvanen @ 2019-10-08 11:33 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sami Tolvanen, Borislav Petkov, Nick Desaulniers, Kees Cook,
	Thomas Hellstrom, clang-built-linux, H. Peter Anvin, Ingo Molnar,
	Thomas Gleixner, virtualization, VMware, Inc.,
	x86-ml, Ingo Molnar, Borislav Petkov, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     fbcfb8f0270bf24fe348393540b17a7f2ba577d7
Gitweb:        https://git.kernel.org/tip/fbcfb8f0270bf24fe348393540b17a7f2ba577d7
Author:        Sami Tolvanen <samitolvanen@google.com>
AuthorDate:    Mon, 07 Oct 2019 12:21:29 -07:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 08 Oct 2019 13:26:42 +02:00

x86/cpu/vmware: Use the full form of INL in VMWARE_PORT

LLVM's assembler doesn't accept the short form INL instruction:

  inl (%%dx)

but instead insists on the output register to be explicitly specified:

  <inline asm>:1:7: error: invalid operand for instruction
          inl (%dx)
             ^
  LLVM ERROR: Error parsing inline asm

Use the full form of the instruction to fix the build.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Cc: clang-built-linux@googlegroups.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: virtualization@lists.linux-foundation.org
Cc: "VMware, Inc." <pv-drivers@vmware.com>
Cc: x86-ml <x86@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/734
Link: https://lkml.kernel.org/r/20191007192129.104336-1-samitolvanen@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/vmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 9735139..46d7326 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -49,7 +49,7 @@
 #define VMWARE_CMD_VCPU_RESERVED 31
 
 #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)				\
-	__asm__("inl (%%dx)" :						\
+	__asm__("inl (%%dx), %%eax" :					\
 		"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :		\
 		"a"(VMWARE_HYPERVISOR_MAGIC),				\
 		"c"(VMWARE_CMD_##cmd),					\

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-08 11:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 19:21 [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT Sami Tolvanen
2019-10-07 19:29 ` Thomas Hellstrom
2019-10-07 19:57 ` Nick Desaulniers
2019-10-08  0:44 ` Kees Cook
2019-10-08  9:59 ` [tip: x86/urgent] x86/cpu/vmware: Use " tip-bot2 for Sami Tolvanen
2019-10-08  9:59 ` tip-bot2 for Sami Tolvanen
2019-10-08 11:33 ` [tip: x86/urgent] x86/cpu/vmware: Use the full form of INL " tip-bot2 for Sami Tolvanen
2019-10-08 11:33 ` tip-bot2 for Sami Tolvanen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).