Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fix from Paolo Bonzini: - Fix boolean logic in intel_guest_get_msrs * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86/pmu: fix masking logic for MSR_CORE_PERF_GLOBAL_CTRL
This commit is contained in:
@@ -4051,12 +4051,17 @@ static struct perf_guest_switch_msr *intel_guest_get_msrs(int *nr, void *data)
|
||||
u64 pebs_mask = cpuc->pebs_enabled & x86_pmu.pebs_capable;
|
||||
int global_ctrl, pebs_enable;
|
||||
|
||||
/*
|
||||
* In addition to obeying exclude_guest/exclude_host, remove bits being
|
||||
* used for PEBS when running a guest, because PEBS writes to virtual
|
||||
* addresses (not physical addresses).
|
||||
*/
|
||||
*nr = 0;
|
||||
global_ctrl = (*nr)++;
|
||||
arr[global_ctrl] = (struct perf_guest_switch_msr){
|
||||
.msr = MSR_CORE_PERF_GLOBAL_CTRL,
|
||||
.host = intel_ctrl & ~cpuc->intel_ctrl_guest_mask,
|
||||
.guest = intel_ctrl & (~cpuc->intel_ctrl_host_mask | ~pebs_mask),
|
||||
.guest = intel_ctrl & ~cpuc->intel_ctrl_host_mask & ~pebs_mask,
|
||||
};
|
||||
|
||||
if (!x86_pmu.pebs)
|
||||
|
||||
Reference in New Issue
Block a user