3863ca0522
commit 05519c86d6997cfb9bb6c82ce1595d1015b718dc upstream.
Use a u64 instead of a u8 when taking a snapshot of pmu->fixed_ctr_ctrl
when reprogramming fixed counters, as truncating the value results in KVM
thinking fixed counter 2 is already disabled (the bug also affects fixed
counters 3+, but KVM doesn't yet support those). As a result, if the
guest disables fixed counter 2, KVM will get a false negative and fail to
reprogram/disable emulation of the counter, which can leads to incorrect
counts and spurious PMIs in the guest.
Fixes:
|
||
---|---|---|
.. | ||
mmu | ||
svm | ||
vmx | ||
.gitignore | ||
Kconfig | ||
Makefile | ||
cpuid.c | ||
cpuid.h | ||
debugfs.c | ||
emulate.c | ||
fpu.h | ||
hyperv.c | ||
hyperv.h | ||
i8254.c | ||
i8254.h | ||
i8259.c | ||
ioapic.c | ||
ioapic.h | ||
irq.c | ||
irq.h | ||
irq_comm.c | ||
kvm-asm-offsets.c | ||
kvm_cache_regs.h | ||
kvm_emulate.h | ||
kvm_onhyperv.c | ||
kvm_onhyperv.h | ||
lapic.c | ||
lapic.h | ||
mmu.h | ||
mtrr.c | ||
pmu.c | ||
pmu.h | ||
reverse_cpuid.h | ||
trace.h | ||
tss.h | ||
x86.c | ||
x86.h | ||
xen.c | ||
xen.h |