diff options
| author | Sean Christopherson <sean.j.christopherson@intel.com> | 2020-03-02 15:56:19 -0800 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-16 17:58:06 +0100 |
| commit | e53c95e8d41ef9927d1d5ff031db1fd6989ec16b (patch) | |
| tree | 026967191c419d23a1a4bdb2796d284d2fec0819 /tools/perf/scripts/python | |
| parent | KVM: x86: Refactor CPUID 0x4 and 0x8000001d handling (diff) | |
| download | linux-e53c95e8d41ef9927d1d5ff031db1fd6989ec16b.tar.gz linux-e53c95e8d41ef9927d1d5ff031db1fd6989ec16b.zip | |
KVM: x86: Encapsulate CPUID entries and metadata in struct
Add a struct to hold the array of CPUID entries and its associated
metadata when handling KVM_GET_SUPPORTED_CPUID. Lookup and provide
the correct entry in do_host_cpuid(), which eliminates the majority of
array indexing shenanigans, e.g. entries[i -1], and generally makes the
code more readable. The last array indexing holdout is kvm_get_cpuid(),
which can't really be avoided without throwing the baby out with the
bathwater.
No functional change intended.
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
