On Wed, Nov 20, 2024, Dapeng Mi wrote: > On 11/19/2024 10:30 PM, Sean Christopherson wrote: > >> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > >> index ad465881b043..2ad122995f11 100644 > >> --- a/arch/x86/kvm/vmx/vmx.c > >> +++ b/arch/x86/kvm/vmx/vmx.c > >> @@ -146,6 +146,8 @@ module_param_named(preemption_timer, enable_preemption_timer, bool, S_IRUGO); > >> extern bool __read_mostly allow_smaller_maxphyaddr; > >> module_param(allow_smaller_maxphyaddr, bool, S_IRUGO); > >> > >> +module_param(enable_passthrough_pmu, bool, 0444); > > Hmm, we either need to put this param in kvm.ko, or move enable_pmu to vendor > > modules (or duplicate it there if we need to for backwards compatibility?). > > > > There are advantages to putting params in vendor modules, when it's safe to do so, > > e.g. it allows toggling the param when (re)loading a vendor module, so I think I'm > > supportive of having the param live in vendor code. I just don't want to split > > the two PMU knobs. > > Since enable_passthrough_pmu has already been in vendor modules, we'd better > duplicate enable_pmu module parameter in vendor modules as the 1st step. Paolo, Any thoughts on having enable_pmu in vendor modules, vs. putting enable_mediated_pmu in kvm.ko? I don't have a strong opinion, there are pros and cons to both.