kvm_stat: Rework platform detection
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 17 Jun 2014 07:54:32 +0000 (17:54 +1000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 31 Oct 2014 15:34:21 +0000 (16:34 +0100)
commit4d4103ff32ee4c88857727515b5e596a1debc227
treea1479bffc9f4548cd3cb1be81cb4be5386e28e63
parent27d318a88583b2bb263292a4d35931a3bc8d2b7a
kvm_stat: Rework platform detection

The current platform detection is a little bit messy. We look for lines
in /proc/cpuinfo starting with 'flags' OR 'vendor-id', and scan both
for values we know will only occur in one or the other. We also keep
scanning once we've found a value, which could be a feature, but isn't
in this case.

We'd also like to add another platform, powerpc, which will just make it
worse. So clean it up in preparation.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/kvm/kvm_stat