Patchwork [RFC,6/6] i386: -cpu help: remove reference to specific CPUID leaves/registers

login
register
mail settings
Submitter Eduardo Habkost
Date Aug. 17, 2012, 5:53 p.m.
Message ID <1345226022-21654-7-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/178289/
State New
Headers show

Comments

Eduardo Habkost - Aug. 17, 2012, 5:53 p.m.
The -cpu configuration interface is based on a list of feature names or
properties, on a single namespace, so there's no need to mention on
which CPUID leaf/register each flag is located.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 target-i386/cpu.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Igor Mammedov - Sept. 5, 2012, 11:47 a.m.
On Fri, 17 Aug 2012 14:53:42 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:

> The -cpu configuration interface is based on a list of feature names or
> properties, on a single namespace, so there's no need to mention on
> which CPUID leaf/register each flag is located.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  target-i386/cpu.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index a71c2fc..0a03c80 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1297,13 +1297,13 @@ void x86_cpu_list(FILE *f, fprintf_function
> cpu_fprintf) }
>      (*cpu_fprintf)(f, "\nRecognized CPUID flags:\n");
>      listflags(buf, sizeof(buf), (uint32_t)~0, feature_name, 1);
> -    (*cpu_fprintf)(f, "  f_edx: %s\n", buf);
> +    (*cpu_fprintf)(f, "  %s\n", buf);
>      listflags(buf, sizeof(buf), (uint32_t)~0, ext_feature_name, 1);
> -    (*cpu_fprintf)(f, "  f_ecx: %s\n", buf);
> +    (*cpu_fprintf)(f, "  %s\n", buf);
>      listflags(buf, sizeof(buf), (uint32_t)~0, ext2_feature_name, 1);
> -    (*cpu_fprintf)(f, "  extf_edx: %s\n", buf);
> +    (*cpu_fprintf)(f, "  %s\n", buf);
>      listflags(buf, sizeof(buf), (uint32_t)~0, ext3_feature_name, 1);
> -    (*cpu_fprintf)(f, "  extf_ecx: %s\n", buf);
> +    (*cpu_fprintf)(f, "  %s\n", buf);
>  }
>  
>  CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)

If you are removing this ones, why do you leave:
if (dump) {
...
(*cpu_fprintf)(f, "  feature_edx %08x (%s)\n", def->features,
....

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index a71c2fc..0a03c80 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1297,13 +1297,13 @@  void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf)
     }
     (*cpu_fprintf)(f, "\nRecognized CPUID flags:\n");
     listflags(buf, sizeof(buf), (uint32_t)~0, feature_name, 1);
-    (*cpu_fprintf)(f, "  f_edx: %s\n", buf);
+    (*cpu_fprintf)(f, "  %s\n", buf);
     listflags(buf, sizeof(buf), (uint32_t)~0, ext_feature_name, 1);
-    (*cpu_fprintf)(f, "  f_ecx: %s\n", buf);
+    (*cpu_fprintf)(f, "  %s\n", buf);
     listflags(buf, sizeof(buf), (uint32_t)~0, ext2_feature_name, 1);
-    (*cpu_fprintf)(f, "  extf_edx: %s\n", buf);
+    (*cpu_fprintf)(f, "  %s\n", buf);
     listflags(buf, sizeof(buf), (uint32_t)~0, ext3_feature_name, 1);
-    (*cpu_fprintf)(f, "  extf_ecx: %s\n", buf);
+    (*cpu_fprintf)(f, "  %s\n", buf);
 }
 
 CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)