summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAaron Lewis <aaronlewis@google.com>2022-05-17 08:12:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-21 16:16:26 +0300
commit98b20e1612e69bf91185cf722a96293a136fe894 (patch)
tree0d1735a4271faeed86bd11e829a67c916bc409ae /drivers
parent705dfc4575d6fae17c60a222cb5f78d8de43be38 (diff)
downloadlinux-98b20e1612e69bf91185cf722a96293a136fe894.tar.xz
kvm: x86/pmu: Fix the compare function used by the pmu event filter
commit 4ac19ead0dfbabd8e0bfc731f507cfb0b95d6c99 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions