On 11/19/2024 11:43 PM, Sean Christopherson wrote: > On Thu, Aug 01, 2024, Mingwei Zhang wrote: >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index 0c40f551130e..6db4dc496d2b 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c >> @@ -239,6 +239,9 @@ EXPORT_SYMBOL_GPL(host_xss); >> u64 __read_mostly host_arch_capabilities; >> EXPORT_SYMBOL_GPL(host_arch_capabilities); >> >> +u64 __read_mostly host_perf_cap; >> +EXPORT_SYMBOL_GPL(host_perf_cap); > In case you don't get a conflict on rebase, this should go in "struct kvm_host_values" > as "perf_capabilities". Sure. Thanks. > >> const struct _kvm_stats_desc kvm_vm_stats_desc[] = { >> KVM_GENERIC_VM_STATS(), >> STATS_DESC_COUNTER(VM, mmu_shadow_zapped), >> @@ -9793,6 +9796,9 @@ int kvm_x86_vendor_init(struct kvm_x86_init_ops *ops) >> if (boot_cpu_has(X86_FEATURE_ARCH_CAPABILITIES)) >> rdmsrl(MSR_IA32_ARCH_CAPABILITIES, host_arch_capabilities); >> >> + if (boot_cpu_has(X86_FEATURE_PDCM)) >> + rdmsrl(MSR_IA32_PERF_CAPABILITIES, host_perf_cap); >> + >> r = ops->hardware_setup(); >> if (r != 0) >> goto out_mmu_exit; >> -- >> 2.46.0.rc1.232.g9752f9e123-goog >>