Re: [PATCH v2 3/4] KVM: x86/vPMU: Reuse perf_event to avoid unnecessary pmc_reprogram_counter

2019-10-21 Thread Like Xu
Hi Paolo, On 2019/10/21 16:12, Paolo Bonzini wrote: Just a naming tweak: On 13/10/19 11:15, Like Xu wrote: + /* the exact requested config to create perf_event */ + u64 programed_config; /* * eventsel value for general purpose counters, ctrl value for *

Re: [PATCH v2 3/4] KVM: x86/vPMU: Reuse perf_event to avoid unnecessary pmc_reprogram_counter

2019-10-21 Thread Paolo Bonzini
Just a naming tweak: On 13/10/19 11:15, Like Xu wrote: > + /* the exact requested config to create perf_event */ > + u64 programed_config; /* * eventsel value for general purpose counters, ctrl value for * fixed counters. */ u64 current_config;

[PATCH v2 3/4] KVM: x86/vPMU: Reuse perf_event to avoid unnecessary pmc_reprogram_counter

2019-10-13 Thread Like Xu
The perf_event_create_kernel_counter() in the pmc_reprogram_counter() is a heavyweight and high-frequency operation, especially when host disables the watchdog (maximum 2100 ns) which leads to an unacceptable latency of the guest NMI handler. It limits the use of vPMUs in the guest. When a