lkml.org 
[lkml]   [2019]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] x86/cpu/vmware: use the full form of inl in VMWARE_PORT
Date
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), \



\
 
 \ /
  Last update: 2019-10-07 21:30    [W:0.069 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site