mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
vmx: Disable vPMU feature by default
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
This commit is contained in:
1 parent
0ce73f80ea
commit
ad1f74192a
1 file changed
+6
@@ -31,6 +31,9 @@
|
||||
#include <public/hvm/save.h>
|
||||
#include <asm/hvm/vmx/vpmu.h>
|
||||
|
||||
static int __read_mostly opt_vpmu_enabled;
|
||||
boolean_param("vpmu", opt_vpmu_enabled);
|
||||
|
||||
int vpmu_do_wrmsr(struct cpu_user_regs *regs)
|
||||
{
|
||||
struct vpmu_struct *vpmu = vcpu_vpmu(current);
|
||||
@@ -79,6 +82,9 @@ void vpmu_initialise(struct vcpu *v)
|
||||
{
|
||||
struct vpmu_struct *vpmu = vcpu_vpmu(v);
|
||||
|
||||
if ( !opt_vpmu_enabled )
|
||||
return;
|
||||
|
||||
if ( vpmu->flags & VPMU_CONTEXT_ALLOCATED )
|
||||
vpmu_destroy(v);
|
||||
|
||||
|
||||