https://github.com/torvalds/linux
Revision 4ac19ead0dfbabd8e0bfc731f507cfb0b95d6c99 authored by Aaron Lewis on 17 May 2022, 05:12:36 UTC, committed by Paolo Bonzini on 20 May 2022, 11:06:29 UTC
When returning from the compare function the u64 is truncated to an
int.  This results in a loss of the high nybble[1] in the event select
and its sign if that nybble is in use.  Switch from using a result that
can end up being truncated to a result that can only be: 1, 0, -1.

[1] bits 35:32 in the event select register and bits 11:8 in the event
    select.

Fixes: 7ff775aca48ad ("KVM: x86/pmu: Use binary search to check filtered events")
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220517051238.2566934-1-aaronlewis@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 6f5adb3
History
Tip revision: 4ac19ead0dfbabd8e0bfc731f507cfb0b95d6c99 authored by Aaron Lewis on 17 May 2022, 05:12:36 UTC
kvm: x86/pmu: Fix the compare function used by the pmu event filter
Tip revision: 4ac19ea
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.9 KB
.mailmap -rw-r--r-- 22.2 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 98.9 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 641.4 KB
Makefile -rw-r--r-- 63.6 KB
README -rw-r--r-- 727 bytes

README

back to top