diff options
author | Sean Christopherson <seanjc@google.com> | 2024-10-09 20:50:02 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-11-01 19:22:23 +0300 |
commit | eecf3985459a4f9128939fbbef75972d7468e4a1 (patch) | |
tree | 87d1049f94e239a026a92a8aaf7d51c5d1dda547 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 1c932fc7620ddb9f5005fd4b0cf7f0ff47ecaaa4 (diff) | |
download | linux-eecf3985459a4f9128939fbbef75972d7468e4a1.tar.xz |
KVM: x86: Use '0' for guest RIP if PMI encounters protected guest state
Explicitly return '0' for guest RIP when handling a PMI VM-Exit for a vCPU
with protected guest state, i.e. when KVM can't read the real RIP. While
there is no "right" value, and profiling a protect guest is rather futile,
returning the last known RIP is worse than returning obviously "bad" data.
E.g. for SEV-ES+, the last known RIP will often point somewhere in the
guest's boot flow.
Opportunistically add WARNs to effectively assert that the in_kernel() and
get_ip() callbacks are restricted to the common PMI handler, as the return
values for the protected guest state case are largely arbitrary, i.e. only
make any sense whatsoever for PMIs, where the returned values have no
functional impact and thus don't truly matter.
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20241009175002.1118178-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions