[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/13] cpuid: list all known x86 CPUID feature flags
From: |
Andre Przywara |
Subject: |
[Qemu-devel] [PATCH 06/13] cpuid: list all known x86 CPUID feature flags |
Date: |
Tue, 2 Feb 2010 11:08:14 +0100 |
-cpu ? currently gives us a list of known CPU models. Add "host" if
using KVM and a list of known CPUID feature flags to the output.
Signed-off-by: Andre Przywara <address@hidden>
---
target-i386/cpuid.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index 19d58e1..3f56c50 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -573,10 +573,30 @@ error:
void x86_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...))
{
- unsigned int i;
+ unsigned int i, j;
+ const char **stringlist[] = {feature_name, ext_feature_name,
+ ext2_feature_name, ext3_feature_name};
for (i = 0; i < ARRAY_SIZE(x86_defs); i++)
(*cpu_fprintf)(f, "x86 %16s\n", x86_defs[i].name);
+ if (kvm_enabled()) {
+ (*cpu_fprintf)(f, "x86 %16s\n", "host");
+ }
+
+ (*cpu_fprintf)(f, "x86 recognized feature flags:\n ");
+ for (j = 0; j < 4; j++) {
+ for (i = 0; i < 32; i++) {
+ if (j == 2 && ((1 << i) & EXT2_FEATURE_MASK))
+ continue;
+ if (stringlist[j][i] == NULL)
+ continue;
+ (*cpu_fprintf)(f, "%s ", stringlist[j][i]);
+ if (i == 15)
+ (*cpu_fprintf)(f, "\n ");
+ }
+ (*cpu_fprintf)(f, "\n ");
+ }
+ return;
}
int cpu_x86_register (CPUX86State *env, const char *cpu_model)
--
1.6.4
- [Qemu-devel] [PATCH 02/13] cpuid: replace magic number with named constant, (continued)
- [Qemu-devel] [PATCH 02/13] cpuid: replace magic number with named constant, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 05/13] cpuid: add missing CPUID feature flag names, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 08/13] cpuid: simplify CPUID flag search function, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 11/13] cpuid: Always expose 32 and 64-bit CPUs, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 10/13] cpuid: add TCG feature bit trimming, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 03/13] cpuid: moved host_cpuid function and remove prototype, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 09/13] cpuid: propagate further CPUID leafs when -cpu host, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 04/13] cpuid: Replace strtok with get_opt_name, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 01/13] cpuid: move CPUID functions into separate file, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 07/13] cpuid: remove unnecessary kvm_trim function, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 06/13] cpuid: list all known x86 CPUID feature flags,
Andre Przywara <=
- [Qemu-devel] [PATCH 12/13] cpuid: Add kvm32 CPU model, Andre Przywara, 2010/02/02
- [Qemu-devel] [PATCH 13/13] cpuid: fix CPUID levels, Andre Przywara, 2010/02/02