Patchwork [v2,20/21] cpuid: Add kvm32 CPU model

login
register
mail settings
Submitter Andre Przywara
Date Sept. 18, 2009, 11:48 a.m.
Message ID <1253274494-13244-21-git-send-email-andre.przywara@amd.com>
Download mbox | patch
Permalink /patch/33842/
State Superseded
Headers show

Comments

Andre Przywara - Sept. 18, 2009, 11:48 a.m.
Create a kvm32 CPU model that describes a least common denominator
for KVM capable guest CPUs. Useful for migration purposes.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
---
 target-i386/cpuid.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

Patch

diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index 1721be2..505fca5 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -256,6 +256,19 @@  static x86_def_t x86_defs[] = {
         .model_id = "QEMU Virtual CPU version " QEMU_VERSION,
     },
     {
+        .name = "kvm32",
+        .level = 5,
+        .family = 15,
+        .model = 6,
+        .stepping = 1,
+        .features = K8_FEATURES,
+        .ext_features = CPUID_EXT_SSE3,
+        .ext2_features = K8_FEATURES & EXT2_FEATURE_MASK,
+        .ext3_features = 0,
+        .xlevel = 0x80000008,
+        .model_id = "Common 32-bit KVM processor"
+    },
+    {
         .name = "coreduo",
         .level = 10,
         .family = 6,