]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: limit the maximum number of vPMU fixed counters to 3
authorLike Xu <like.xu@linux.intel.com>
Wed, 24 Jun 2020 01:59:28 +0000 (09:59 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jul 2020 20:21:59 +0000 (16:21 -0400)
commit855343a6a3422a38b40beebfb647c81eaa49602f
tree994265378ecbef9b0dc83c4182adc4d4c8b31a9b
parentb173fd35877930f2c02836e6cccea5c0895afc77
kvm: x86: limit the maximum number of vPMU fixed counters to 3

Some new Intel platforms (such as TGL) already have the
fourth fixed counter TOPDOWN.SLOTS, but it has not been
fully enabled on KVM and the host.

Therefore, we limit edx.split.num_counters_fixed to 3,
so that it does not break the kvm-unit-tests PMU test
case and bad-handled userspace.

Signed-off-by: Like Xu <like.xu@linux.intel.com>
Message-Id: <20200624015928.118614-1-like.xu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/pmu.h