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:35:36 +0000 (04:35 -0800)
commit726599c637995a99c13207a80577e69eca2f84a6
treea18e29daebb872135ce22002ab5b299f48b7d465
parent7a19bd6fe21bcc081db364c42056bd0132bef27b
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