Re: [PATCH 02/10] cpu_x86: Prepare for ecx_in CPUID parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 08, 2016 at 14:41:30 +0200, Jiri Denemark wrote:
> CPUID instruction normally takes its parameter from EAX, but sometimes
> ECX is used as an additional parameter. This patch prepares the x86 CPU
> driver code for the new 'ecx_in' CPUID parameter.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/cpu/cpu_x86.c                                  | 52 +++++++++++++---------
>  src/cpu/cpu_x86_data.h                             |  1 +
>  src/qemu/qemu_monitor_json.c                       |  4 ++
>  .../qemumonitorjson-getcpu-ecx.data                | 10 ++---
>  .../qemumonitorjson-getcpu-full.data               |  6 +--
>  .../qemumonitorjson-getcpu-host.data               |  8 ++--
>  6 files changed, 49 insertions(+), 32 deletions(-)
> 
> diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
> index 82921db..ae809de 100644
> --- a/src/cpu/cpu_x86.c
> +++ b/src/cpu/cpu_x86.c

[...]

> @@ -1860,7 +1869,8 @@ cpuidCall(virCPUx86CPUID *cpuid)
>            "=b" (cpuid->ebx),
>            "=c" (cpuid->ecx),
>            "=d" (cpuid->edx)
> -        : "a" (cpuid->eax_in));
> +        : "a" (cpuid->eax_in),
> +          "c" (cpuid->ecx_in));
>  # else
>      /* we need to avoid direct use of ebx for CPUID output as it is used
>       * for global offset table on i386 with -fPIC
> @@ -1876,7 +1886,8 @@ cpuidCall(virCPUx86CPUID *cpuid)
>            "=r" (cpuid->ebx),
>            "=c" (cpuid->ecx),
>            "=d" (cpuid->edx)
> -        : "a" (cpuid->eax_in)
> +        : "a" (cpuid->eax_in),
> +          "c" (cpuid->ecx_in)

I think the removal of clearing of the ECX register from the next patch
in the asm code above actually belongs here.

>          : "cc");
>  # endif
>  }

ACK with the above resolved

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]