From 1c1ee41f88fd24039b67a14a3a1eaf25a3680592 Mon Sep 17 00:00:00 2001 From: Cheng Hong Date: Mon, 2 Sep 2024 17:41:20 +0800 Subject: [PATCH] anolis: KVM: x86/vmx: Expose pebs format to guest perf_cap iif vmx_pebs_supported() ANBZ: #9843 EPT-friendly PEBS facility is required to support guest pebs, and perf_cap msr is used to expose pebs format (cap) to guest. PEBS can be exposed to guest if and only if pebs_ept supported, which check is done in vmx_pebs_supported(). Fixes: 0fb946332570 ("KVM: x86/pmu: Expose CPUIDs feature bits PDCM, DS, DTES64") Signed-off-by: Cheng Hong --- arch/x86/kvm/vmx/capabilities.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kvm/vmx/capabilities.h b/arch/x86/kvm/vmx/capabilities.h index a52b419e484e..113eda3c0bed 100644 --- a/arch/x86/kvm/vmx/capabilities.h +++ b/arch/x86/kvm/vmx/capabilities.h @@ -408,8 +408,6 @@ static inline u64 vmx_get_perf_capabilities(void) if (boot_cpu_has(X86_FEATURE_PDCM)) rdmsrl(MSR_IA32_PERF_CAPABILITIES, host_perf_cap); - perf_cap |= host_perf_cap; - if (vmx_pebs_supported()) { perf_cap |= host_perf_cap & PERF_CAP_PEBS_MASK; -- Gitee