]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86/pmu: Introduce the ctrl_mask value for fixed counter
authorLike Xu <like.xu@linux.intel.com>
Mon, 11 Apr 2022 10:19:34 +0000 (18:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:42:28 +0000 (14:42 +0200)
commit3047d8aa38e7444cace834f48303771971fad631
tree34d2a995597f88597a96076de68bbaa62e77662d
parent0cacf09ed64143e57b8a0c683dc0248b87e26b7f
KVM: x86/pmu: Introduce the ctrl_mask value for fixed counter

[ Upstream commit 2c985527dd8d283e786ad7a67e532ef7f6f00fac ]

The mask value of fixed counter control register should be dynamic
adjusted with the number of fixed counters. This patch introduces a
variable that includes the reserved bits of fixed counter control
registers. This is a generic code refactoring.

Co-developed-by: Luwei Kang <luwei.kang@intel.com>
Signed-off-by: Luwei Kang <luwei.kang@intel.com>
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Message-Id: <20220411101946.20262-6-likexu@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/vmx/pmu_intel.c