diff options
author | Michael Roth <[email protected]> | 2021-01-27 20:44:51 -0600 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2021-01-28 02:40:11 -0500 |
commit | 181f494888d5b178ffda41bed965f187d5e5c432 (patch) | |
tree | f7b92bdd8cfa39361a2b1076d3194f0f2e90d4dc /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 9a78e15802a87de2b08dfd1bd88e855201d2c8fa (diff) |
KVM: x86: fix CPUID entries returned by KVM_GET_CPUID2 ioctl
Recent commit 255cbecfe0 modified struct kvm_vcpu_arch to make
'cpuid_entries' a pointer to an array of kvm_cpuid_entry2 entries
rather than embedding the array in the struct. KVM_SET_CPUID and
KVM_SET_CPUID2 were updated accordingly, but KVM_GET_CPUID2 was missed.
As a result, KVM_GET_CPUID2 currently returns random fields from struct
kvm_vcpu_arch to userspace rather than the expected CPUID values. Fix
this by treating 'cpuid_entries' as a pointer when copying its
contents to userspace buffer.
Fixes: 255cbecfe0c9 ("KVM: x86: allocate vcpu->arch.cpuid_entries dynamically")
Cc: Vitaly Kuznetsov <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
Message-Id: <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions