Re: [PATCH v3 06/17] KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS

2021-01-15 Thread Xu, Like
On 2021/1/15 22:46, Peter Zijlstra wrote: On Mon, Jan 04, 2021 at 09:15:31PM +0800, Like Xu wrote: + if (cpuc->pebs_enabled & ~cpuc->intel_ctrl_host_mask) { + arr[1].msr = MSR_IA32_PEBS_ENABLE; + arr[1].host = cpuc->pebs_enabled & ~cpuc->intel_ctrl_guest_mask;

Re: [PATCH v3 06/17] KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS

2021-01-15 Thread Peter Zijlstra
On Mon, Jan 04, 2021 at 09:15:31PM +0800, Like Xu wrote: > + if (cpuc->pebs_enabled & ~cpuc->intel_ctrl_host_mask) { > + arr[1].msr = MSR_IA32_PEBS_ENABLE; > + arr[1].host = cpuc->pebs_enabled & ~cpuc->intel_ctrl_guest_mask; > + arr[1].guest = cpuc->pebs_ena

Re: [PATCH v3 06/17] KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS

2021-01-07 Thread Xu, Like
Hi Sean, On 2021/1/6 5:11, Sean Christopherson wrote: On Mon, Jan 04, 2021, Like Xu wrote: If IA32_PERF_CAPABILITIES.PEBS_BASELINE [bit 14] is set, the IA32_PEBS_ENABLE MSR exists and all architecturally enumerated fixed and general purpose counters have corresponding bits in IA32_PEBS_ENABLE t

Re: [PATCH v3 06/17] KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS

2021-01-05 Thread Sean Christopherson
On Mon, Jan 04, 2021, Like Xu wrote: > If IA32_PERF_CAPABILITIES.PEBS_BASELINE [bit 14] is set, the > IA32_PEBS_ENABLE MSR exists and all architecturally enumerated fixed > and general purpose counters have corresponding bits in IA32_PEBS_ENABLE > that enable generation of PEBS records. The general

[PATCH v3 06/17] KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS

2021-01-04 Thread Like Xu
If IA32_PERF_CAPABILITIES.PEBS_BASELINE [bit 14] is set, the IA32_PEBS_ENABLE MSR exists and all architecturally enumerated fixed and general purpose counters have corresponding bits in IA32_PEBS_ENABLE that enable generation of PEBS records. The general-purpose counter bits start at bit IA32_PEBS_