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

[Xen-changelog] [xen-unstable] x86 hvm vpmu: Print error if VPMU cannot be init'ed on this CPU.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1289907849 0
# Node ID 379123d8dbab42351f9ebf41bcb0a21ef8440c24
# Parent  9b2ca938cfe6c0639471e24634bc4a48d889b412
x86 hvm vpmu: Print error if VPMU cannot be init'ed on this CPU.

Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
 xen/arch/x86/hvm/vpmu.c |   54 ++++++++++++++++++++++++------------------------
 1 files changed, 27 insertions(+), 27 deletions(-)

diff -r 9b2ca938cfe6 -r 379123d8dbab xen/arch/x86/hvm/vpmu.c
--- a/xen/arch/x86/hvm/vpmu.c   Tue Nov 16 11:28:33 2010 +0000
+++ b/xen/arch/x86/hvm/vpmu.c   Tue Nov 16 11:44:09 2010 +0000
@@ -97,43 +97,43 @@ void vpmu_initialise(struct vcpu *v)
 
     switch ( vendor )
     {
-        case X86_VENDOR_AMD:
+    case X86_VENDOR_AMD:
+        switch ( family )
         {
-            switch ( family )
-            {
-            case 0x10:
-                vpmu->arch_vpmu_ops = &amd_vpmu_ops;
-                break;
-            default:
-                printk("VMPU: Initialization failed. "
-                       "AMD processor family %d has not "
-                       "been supported\n", family);
-                return;
-            }
+        case 0x10:
+            vpmu->arch_vpmu_ops = &amd_vpmu_ops;
+            break;
+        default:
+            printk("VPMU: Initialization failed. "
+                   "AMD processor family %d has not "
+                   "been supported\n", family);
+            return;
         }
         break;
 
-        case X86_VENDOR_INTEL:
+    case X86_VENDOR_INTEL:
+        if ( family == 6 )
         {
-            if ( family == 6 )
+            switch ( cpu_model )
             {
-                switch ( cpu_model )
-                {
-                case 15:
-                case 23:
-                case 26:
-                case 29:
-                    vpmu->arch_vpmu_ops = &core2_vpmu_ops;
-                    break;
-                }
+            case 15:
+            case 23:
+            case 26:
+            case 29:
+                vpmu->arch_vpmu_ops = &core2_vpmu_ops;
+                break;
             }
         }
+        if ( vpmu->arch_vpmu_ops == NULL )
+            printk("VPMU: Initialization failed. "
+                   "Intel processor family %d model %d has not "
+                   "been supported\n", family, cpu_model);
         break;
 
-        default:
-            printk("VMPU: Initialization failed. "
-                   "Unknown CPU vendor %d\n", vendor);
-            return;
+    default:
+        printk("VPMU: Initialization failed. "
+               "Unknown CPU vendor %d\n", vendor);
+        break;
     }
 
     if ( vpmu->arch_vpmu_ops != NULL )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.