]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: vmx/pmu: Add PMU_CAP_LBR_FMT check when guest LBR is enabled
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Feb 2021 14:36:08 +0000 (09:36 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 10:27:24 +0000 (05:27 -0500)
commitcf75adcaad974b4a9a413c492d274e6fc1909fc3
tree6a973ed310fb4a63ddf2eb8ad4e8664d536cee33
parente649e22a4f97d843b112cd7c9c1c9952a225196a
KVM: vmx/pmu: Add PMU_CAP_LBR_FMT check when guest LBR is enabled

Usespace could set the bits [0, 5] of the IA32_PERF_CAPABILITIES
MSR which tells about the record format stored in the LBR records.

The LBR will be enabled on the guest if host perf supports LBR
(checked via x86_perf_get_lbr()) and the vcpu model is compatible
with the host one.

Signed-off-by: Like Xu <like.xu@linux.intel.com>
Message-Id: <20210201051039.255478-4-like.xu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/capabilities.h
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h