[PATCH] target/i386: Add the 'model-id' for Skylake -v3 CPU models

Kashyap Chamarthy posted 1 patch 4 years, 3 months ago
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200123090116.14409-1-kchamart@redhat.com
Maintainers: Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>
target/i386/cpu.c | 4 ++++
1 file changed, 4 insertions(+)
[PATCH] target/i386: Add the 'model-id' for Skylake -v3 CPU models
Posted by Kashyap Chamarthy 4 years, 3 months ago
This fixes a confusion in the help output.  (Although, if you squint
long enough at the '-cpu help' output, you _do_ notice that
"Skylake-Client-noTSX-IBRS" is an alias of "Skylake-Client-v3";
similarly for Skylake-Server-v3.)

Without this patch:

    $ qemu-system-x86 -cpu help
    ...
    x86 Skylake-Client-v1     Intel Core Processor (Skylake)
    x86 Skylake-Client-v2     Intel Core Processor (Skylake, IBRS)
    x86 Skylake-Client-v3     Intel Core Processor (Skylake, IBRS)
    ...
    x86 Skylake-Server-v1     Intel Xeon Processor (Skylake)
    x86 Skylake-Server-v2     Intel Xeon Processor (Skylake, IBRS)
    x86 Skylake-Server-v3     Intel Xeon Processor (Skylake, IBRS)
    ...

With this patch:

    $ ./qemu-system-x86 -cpu help
    ...
    x86 Skylake-Client-v1     Intel Core Processor (Skylake)
    x86 Skylake-Client-v2     Intel Core Processor (Skylake, IBRS)
    x86 Skylake-Client-v3     Intel Core Processor (Skylake, IBRS, no TSX)
    ...
    x86 Skylake-Server-v1     Intel Xeon Processor (Skylake)
    x86 Skylake-Server-v2     Intel Xeon Processor (Skylake, IBRS)
    x86 Skylake-Server-v3     Intel Xeon Processor (Skylake, IBRS, no TSX)
    ...

Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
---
 target/i386/cpu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 41f28cebf946c7dd77a066eac55623a7370730d5..821cab7f2a4eda43631359a95f7b3bb301b9788f 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -2905,6 +2905,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
                 .props = (PropValue[]) {
                     { "hle", "off" },
                     { "rtm", "off" },
+                    { "model-id",
+                      "Intel Core Processor (Skylake, IBRS, no TSX)" },
                     { /* end of list */ }
                 }
             },
@@ -3028,6 +3030,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
                 .props = (PropValue[]) {
                     { "hle", "off" },
                     { "rtm", "off" },
+                    { "model-id",
+                      "Intel Xeon Processor (Skylake, IBRS, no TSX)" },
                     { /* end of list */ }
                 }
             },
-- 
2.21.0


Re: [PATCH] target/i386: Add the 'model-id' for Skylake -v3 CPU models
Posted by Paolo Bonzini 4 years, 3 months ago
On 23/01/20 10:01, Kashyap Chamarthy wrote:
> This fixes a confusion in the help output.  (Although, if you squint
> long enough at the '-cpu help' output, you _do_ notice that
> "Skylake-Client-noTSX-IBRS" is an alias of "Skylake-Client-v3";
> similarly for Skylake-Server-v3.)
> 
> Without this patch:
> 
>     $ qemu-system-x86 -cpu help
>     ...
>     x86 Skylake-Client-v1     Intel Core Processor (Skylake)
>     x86 Skylake-Client-v2     Intel Core Processor (Skylake, IBRS)
>     x86 Skylake-Client-v3     Intel Core Processor (Skylake, IBRS)
>     ...
>     x86 Skylake-Server-v1     Intel Xeon Processor (Skylake)
>     x86 Skylake-Server-v2     Intel Xeon Processor (Skylake, IBRS)
>     x86 Skylake-Server-v3     Intel Xeon Processor (Skylake, IBRS)
>     ...
> 
> With this patch:
> 
>     $ ./qemu-system-x86 -cpu help
>     ...
>     x86 Skylake-Client-v1     Intel Core Processor (Skylake)
>     x86 Skylake-Client-v2     Intel Core Processor (Skylake, IBRS)
>     x86 Skylake-Client-v3     Intel Core Processor (Skylake, IBRS, no TSX)
>     ...
>     x86 Skylake-Server-v1     Intel Xeon Processor (Skylake)
>     x86 Skylake-Server-v2     Intel Xeon Processor (Skylake, IBRS)
>     x86 Skylake-Server-v3     Intel Xeon Processor (Skylake, IBRS, no TSX)
>     ...
> 
> Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
> ---
>  target/i386/cpu.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 41f28cebf946c7dd77a066eac55623a7370730d5..821cab7f2a4eda43631359a95f7b3bb301b9788f 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -2905,6 +2905,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
>                  .props = (PropValue[]) {
>                      { "hle", "off" },
>                      { "rtm", "off" },
> +                    { "model-id",
> +                      "Intel Core Processor (Skylake, IBRS, no TSX)" },
>                      { /* end of list */ }
>                  }
>              },
> @@ -3028,6 +3030,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
>                  .props = (PropValue[]) {
>                      { "hle", "off" },
>                      { "rtm", "off" },
> +                    { "model-id",
> +                      "Intel Xeon Processor (Skylake, IBRS, no TSX)" },
>                      { /* end of list */ }
>                  }
>              },
> 

Queued, thanks.

Paolo