diff options
author | Gleb Natapov <gleb@redhat.com> | 2012-02-26 09:55:41 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-08 07:13:26 -0500 |
commit | fac3368310765ade6bbdf07c9acdb04210e8b5b0 (patch) | |
tree | 7107571bc81f9716a1463958891deacee274bd30 /arch/x86/kvm/pmu.c | |
parent | a7b9d2ccc3d86303ee9314612d301966e04011c7 (diff) |
KVM: PMU: Fix raw event check
If eventsel has EDGE, INV or CMASK set we should create raw counter for
it, but the check is done on a wrong variable. Fix it.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/pmu.c')
-rw-r--r-- | arch/x86/kvm/pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index 6af9a542e541..b52a8ed283b2 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c | |||
@@ -223,7 +223,7 @@ static void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel) | |||
223 | event_select = eventsel & ARCH_PERFMON_EVENTSEL_EVENT; | 223 | event_select = eventsel & ARCH_PERFMON_EVENTSEL_EVENT; |
224 | unit_mask = (eventsel & ARCH_PERFMON_EVENTSEL_UMASK) >> 8; | 224 | unit_mask = (eventsel & ARCH_PERFMON_EVENTSEL_UMASK) >> 8; |
225 | 225 | ||
226 | if (!(event_select & (ARCH_PERFMON_EVENTSEL_EDGE | | 226 | if (!(eventsel & (ARCH_PERFMON_EVENTSEL_EDGE | |
227 | ARCH_PERFMON_EVENTSEL_INV | | 227 | ARCH_PERFMON_EVENTSEL_INV | |
228 | ARCH_PERFMON_EVENTSEL_CMASK))) { | 228 | ARCH_PERFMON_EVENTSEL_CMASK))) { |
229 | config = find_arch_event(&pmc->vcpu->arch.pmu, event_select, | 229 | config = find_arch_event(&pmc->vcpu->arch.pmu, event_select, |