diff options
author | Sean Christopherson <seanjc@google.com> | 2024-08-02 11:19:32 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-08-22 12:07:36 -0700 |
commit | 1cec2034980ad03ebf8ce0f187a8f3101c33e611 (patch) | |
tree | 033105292c59c7035ba4de0ecce2c8f6722d23e2 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 7075f163615072a74bae7c5344210adec5f9ea2a (diff) |
KVM: x86: Funnel all fancy MSR return value handling into a common helper
Add a common helper, kvm_do_msr_access(), to invoke the "leaf" APIs that
are type and access specific, and more importantly to handle errors that
are returned from the leaf APIs. I.e. turn kvm_msr_ignored_check() from a
a helper that is called on an error, into a trampoline that detects errors
*and* applies relevant side effects, e.g. logging unimplemented accesses.
Because the leaf APIs are used for guest accesses, userspace accesses, and
KVM accesses, and because KVM supports restricting access to MSRs from
userspace via filters, the error handling is subtly non-trivial. E.g. KVM
has had at least one bug escape due to making each "outer" function handle
errors. See commit 3376ca3f1a20 ("KVM: x86: Fix KVM_GET_MSRS stack info
leak").
Link: https://lore.kernel.org/r/20240802181935.292540-8-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions