tools/kvm_stat: Fix kvm_exit filter name
authorGavin Shan <gshan@redhat.com>
Tue, 10 Dec 2019 04:48:29 +0000 (15:48 +1100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Jan 2020 08:51:06 +0000 (09:51 +0100)
commit5fcf3a55a62afb0760ccb6f391d62f20bce4a42f
tree9bbbe56779358a6aa5bdc6db988ffcd2453a7d3a
parent56871d444bc4d7ea66708775e62e2e0926384dbc
tools/kvm_stat: Fix kvm_exit filter name

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>
tools/kvm/kvm_stat/kvm_stat