Hi Xiaoyao and Zhao, On 3/5/25 6:41 AM, Zhao Liu wrote: >>> + if (has_pmu_cap && !X86_CPU(cpu)->enable_pmu) { >> >> One nit, it's safer to use >> >> (has_pmu_cap & KVM_PMU_CAP_DISABLE) && !X86_CPU(cpu)->enable_pmu >> >> Maybe we can rename has_pmu_cap to pmu_cap as well. > > Yes, I agree. > Thanks both of you very much! I also need to modify PATCH 08/10 where has_pmu_cap is used. [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers during VM reset Dongli Zhang