tools/kvm_stat: Fix kvm_exit filter name
authorGavin Shan <gshan@redhat.com>
Tue, 10 Dec 2019 04:48:29 +0000 (15:48 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:34:08 +0000 (04:34 -0800)
commitd85e2964a37c7f703b6ff7f95715ecc81356ebaa
tree667d81dc82ec7da4213f8d7e83ca3de33c72c292
parent3696eddd45944cfdb11a384e9d2849311d5cbc43
tools/kvm_stat: Fix kvm_exit filter name

commit 5fcf3a55a62afb0760ccb6f391d62f20bce4a42f upstream.

The filter name is fixed to "exit_reason" for some kvm_exit events, no
matter what architect we have. Actually, the filter name ("exit_reason")
is only applicable to x86, meaning it's broken on other architects
including aarch64.

This fixes the issue by providing various kvm_exit filter names, depending
on architect we're on. Afterwards, the variable filter name is picked and
applied through ioctl(fd, SET_FILTER).

Reported-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Gavin Shan <gshan@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/kvm/kvm_stat/kvm_stat