diff options
| author | Yosry Ahmed <yosry@kernel.org> | 2026-02-25 00:59:47 +0000 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-03-04 10:38:38 -0800 |
| commit | 8d397582f6b5e9fbcf09781c7c934b4910e94a50 (patch) | |
| tree | 0f045dcd0f871661862359a4abb2425809a7c7f5 /tools/perf/scripts/python/stackcollapse.py | |
| parent | e5cdd34b5f74c4a0c72fe43092192f347d999e77 (diff) | |
KVM: nSVM: Always use NextRIP as vmcb02's NextRIP after first L2 VMRUN
For guests with NRIPS disabled, L1 does not provide NextRIP when running
an L2 with an injected soft interrupt, instead it advances the current RIP
before running it. KVM uses the current RIP as the NextRIP in vmcb02 to
emulate a CPU without NRIPS.
However, after L2 runs the first time, NextRIP will be updated by the CPU
and/or KVM, and the current RIP is no longer the correct value to use in
vmcb02. Hence, after save/restore, use the current RIP if and only if a
nested run is pending, otherwise use NextRIP. Give soft_int_next_rip the
same treatment, as it's the same logic, just for a narrower use case.
Fixes: cc440cdad5b7 ("KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE")
CC: stable@vger.kernel.org
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
Link: https://patch.msgid.link/20260225005950.3739782-6-yosry@kernel.org
[sean: give soft_int_next_rip the same treatment]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
