diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-03-04 16:06:56 -0800 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-03-04 16:06:56 -0800 |
| commit | c64bc6ed1764c1b7e3c0017019f743196074092f (patch) | |
| tree | 6daf94a23cce49909d4f1a5fd4dbee05d82dcbbf /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | a0592461f39c00b28f552fe842a063a00043eaa8 (diff) | |
KVM: nSVM: Delay setting soft IRQ RIP tracking fields until vCPU run
In the save+restore path, when restoring nested state, the values of RIP
and CS base passed into nested_vmcb02_prepare_control() are mostly
incorrect. They are both pulled from the vmcb02. For CS base, the value
is only correct if system regs are restored before nested state. The
value of RIP is whatever the vCPU had in vmcb02 before restoring nested
state (zero on a freshly created vCPU).
Instead, take a similar approach to NextRIP, and delay initializing the
RIP tracking fields until shortly before the vCPU is run, to make sure
the most up-to-date values of RIP and CS base are used regardless of
KVM_SET_SREGS, KVM_SET_REGS, and KVM_SET_NESTED_STATE's relative
ordering.
Fixes: cc440cdad5b7 ("KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE")
CC: stable@vger.kernel.org
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
Link: https://patch.msgid.link/20260225005950.3739782-8-yosry@kernel.org
[sean: deal with the svm_cancel_injection() madness]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
