diff options
author | Keir Fraser <keir@xen.org> | 2010-11-16 11:44:09 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2010-11-16 11:44:09 +0000 |
commit | 36ba5243d48c10b2fa0717b26e8f3b2e0e26902b (patch) | |
tree | 2dab32c64b16c3a372a81b6161d7cd7223da4c65 /xen/arch/x86/hvm/vpmu.c | |
parent | 7118250f935b39a2df5d27be61c1484b087ed823 (diff) | |
download | xen-36ba5243d48c10b2fa0717b26e8f3b2e0e26902b.tar.gz xen-36ba5243d48c10b2fa0717b26e8f3b2e0e26902b.tar.bz2 xen-36ba5243d48c10b2fa0717b26e8f3b2e0e26902b.zip |
x86 hvm vpmu: Print error if VPMU cannot be init'ed on this CPU.
Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/hvm/vpmu.c')
-rw-r--r-- | xen/arch/x86/hvm/vpmu.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/xen/arch/x86/hvm/vpmu.c b/xen/arch/x86/hvm/vpmu.c index f1917601ec..5214529a4e 100644 --- a/xen/arch/x86/hvm/vpmu.c +++ b/xen/arch/x86/hvm/vpmu.c @@ -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 ) |