]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm/kvm: Do not silently remove PMU
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Sat, 20 Jul 2024 09:30:50 +0000 (18:30 +0900)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Jul 2024 15:02:25 +0000 (16:02 +0100)
commit0d2aac4ab1777162c7a7ecd5a6d5d4de93842116
tree0a275712de58e32d1547e6d90151f448500bebe0
parent613d0b8ebbf1fa32f8037cb02b7c82f96011ef2d
target/arm/kvm: Do not silently remove PMU

kvm_arch_init_vcpu() used to remove PMU when it is not available even
if the CPU model needs one. It is semantically incorrect, and may
continue execution on a misbehaving host that advertises a CPU model
while lacking its PMU. Keep the PMU when the CPU model needs one, and
let kvm_arm_vcpu_init() fail if the KVM implementation mismatches with
our expectation.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/kvm.c