x86/VPMU: clear the overflow status of which counter happened to overflow
authorLuwei Kang <luwei.kang@intel.com>
Tue, 13 Dec 2016 13:21:26 +0000 (14:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 13 Dec 2016 13:21:26 +0000 (14:21 +0100)
Just set the corresponding bits of counters which happened to overflow,
rather than setting all the available bits of IA32_PERF_GLOBAL_OVF_CTRL
when pmu interrupt happened.

Signed-off-by: Luwei Kang <luwei.kang@intel.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/vpmu_intel.c

index e51bc4e61f41d0289ce07c4f5c7906ba89bbe5a8..16e5afb3a7cf6d1109a113a1c416888594ab9ae8 100644 (file)
@@ -837,7 +837,7 @@ static int core2_vpmu_do_interrupt(struct cpu_user_regs *regs)
         if ( is_pmc_quirk )
             handle_pmc_quirk(msr_content);
         core2_vpmu_cxt->global_status |= msr_content;
-        msr_content = ~global_ovf_ctrl_mask;
+        msr_content &= ~global_ovf_ctrl_mask;
         wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, msr_content);
     }
     else