From: Dietmar Hahn Subject: [PATCH] Print a message if no vpmu support for Intel cpu Date: Tue, 16 Nov 2010 11:33:26 +0100 Message-ID: <201011161133.27131.dietmar.hahn@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_33l4Mk6WIUxrBTa" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --Boundary-00=_33l4Mk6WIUxrBTa Content-Type: multipart/alternative; boundary="Boundary-01=_33l4MdJpklqG8aI" Content-Transfer-Encoding: 7bit --Boundary-01=_33l4MdJpklqG8aI Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Print a message if there is no vpmu support for this Intel cpu. Signed-off-by: Dietmar Hahn diff -r 87f248de5230 -r 8902695abe34 xen/arch/x86/hvm/vpmu.c --- a/xen/arch/x86/hvm/vpmu.c Mon Nov 15 09:31:38 2010 +0000 +++ b/xen/arch/x86/hvm/vpmu.c Tue Nov 16 11:22:39 2010 +0100 @@ -115,6 +115,7 @@ case X86_VENDOR_INTEL: { + int supported = 1; if ( family == 6 ) { switch ( cpu_model ) @@ -125,8 +126,20 @@ case 29: vpmu->arch_vpmu_ops = &core2_vpmu_ops; break; + default: + supported = 0; } } + else + supported = 0; + + if ( !supported ) + { + printk("VMPU: Initialization failed. " + "Intel processor family %d model %d has not " + "been supported\n", family, cpu_model); + return; + } } break; -- Company details: http://ts.fujitsu.com/imprint.html --Boundary-01=_33l4MdJpklqG8aI Content-Type: text/html; charset="iso-8859-15" Content-Transfer-Encoding: 7bit

Print a message if there is no vpmu support for this Intel cpu.

Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>

diff -r 87f248de5230 -r 8902695abe34 xen/arch/x86/hvm/vpmu.c

--- a/xen/arch/x86/hvm/vpmu.c Mon Nov 15 09:31:38 2010 +0000

+++ b/xen/arch/x86/hvm/vpmu.c Tue Nov 16 11:22:39 2010 +0100

@@ -115,6 +115,7 @@

case X86_VENDOR_INTEL:

{

+ int supported = 1;

if ( family == 6 )

{

switch ( cpu_model )

@@ -125,8 +126,20 @@

case 29:

vpmu->arch_vpmu_ops = &core2_vpmu_ops;

break;

+ default:

+ supported = 0;

}

}

+ else

+ supported = 0;

+

+ if ( !supported )

+ {

+ printk("VMPU: Initialization failed. "

+ "Intel processor family %d model %d has not "

+ "been supported\n", family, cpu_model);

+ return;

+ }

}

break;

--

Company details: http://ts.fujitsu.com/imprint.html

--Boundary-01=_33l4MdJpklqG8aI-- --Boundary-00=_33l4Mk6WIUxrBTa Content-Type: text/x-patch; charset="UTF-8"; name="vpmu_support.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vpmu_support.patch" # HG changeset patch # User Dietmr Hahn # Date 1289902959 -3600 # Node ID 8902695abe3412e642c3700855e6788981128313 # Parent 87f248de52304bc96a80dc093250fed0197f37e0 Print a message if there is no vpmu support for this Intel cpu. Signed-off-by: Dietmar Hahn diff -r 87f248de5230 -r 8902695abe34 xen/arch/x86/hvm/vpmu.c --- a/xen/arch/x86/hvm/vpmu.c Mon Nov 15 09:31:38 2010 +0000 +++ b/xen/arch/x86/hvm/vpmu.c Tue Nov 16 11:22:39 2010 +0100 @@ -115,6 +115,7 @@ case X86_VENDOR_INTEL: { + int supported = 1; if ( family == 6 ) { switch ( cpu_model ) @@ -125,8 +126,20 @@ case 29: vpmu->arch_vpmu_ops = &core2_vpmu_ops; break; + default: + supported = 0; } } + else + supported = 0; + + if ( !supported ) + { + printk("VMPU: Initialization failed. " + "Intel processor family %d model %d has not " + "been supported\n", family, cpu_model); + return; + } } break; --Boundary-00=_33l4Mk6WIUxrBTa Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_33l4Mk6WIUxrBTa--