WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Disable vPMU feature by default

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Disable vPMU feature by default
From: "Shan, Haitao" <haitao.shan@xxxxxxxxx>
Date: Tue, 3 Nov 2009 13:58:21 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "maillists.shan@xxxxxxxxx" <maillists.shan@xxxxxxxxx>
Delivery-date: Mon, 02 Nov 2009 21:59:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpcSqXFPZVt3iZERceVXa/mMhAyfg==
Thread-topic: [PATCH] Disable vPMU feature by default
Hi, Keir,

This little patch will disable vPMU (PMU passthrough to HVM guests) by default. 
If someone is really want to use this feature, he can use "vpmu=1" to turn it 
on manually.

Signed-off-by: Shan Haitao <haitao.shan@xxxxxxxxx>

diff -r 19f0e0867a18 xen/arch/x86/hvm/vmx/vpmu.c
--- a/xen/arch/x86/hvm/vmx/vpmu.c       Mon Nov 02 09:38:34 2009 +0000
+++ b/xen/arch/x86/hvm/vmx/vpmu.c       Mon Nov 02 23:16:29 2009 +0800
@@ -30,6 +30,9 @@
 #include <public/sched.h>
 #include <public/hvm/save.h>
 #include <asm/hvm/vmx/vpmu.h>
+
+static int __read_mostly opt_vpmu_enabled = 0;
+boolean_param("vpmu", opt_vpmu_enabled);
 
 int vpmu_do_wrmsr(struct cpu_user_regs *regs)
 {
@@ -79,6 +82,9 @@ void vpmu_initialise(struct vcpu *v)
 {
     struct vpmu_struct *vpmu = vcpu_vpmu(v);
 
+    if ( !opt_vpmu_enabled )
+        return;
+

Best Regards
Shan Haitao

Attachment: disable_vpmu.patch
Description: disable_vpmu.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Disable vPMU feature by default, Shan, Haitao <=