diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-04-23 19:26:28 +0300 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-05-13 19:54:30 +0300 |
| commit | b21525756e8288560939bc2055218f3e2961db04 (patch) | |
| tree | aba168c907cb6dc08c71afab85003983bc47a056 /tools/perf/scripts/python | |
| parent | 0ffedf43910e44b76c2c1db4e9fbf12b268190c1 (diff) | |
| download | linux-b21525756e8288560939bc2055218f3e2961db04.tar.xz | |
KVM: SVM: Refresh vcpu->arch.cr{0,3} prior to invoking fastpath handler
Refresh KVM's copies of CR0 and CR3 from the VMCB prior to (potentially)
invoking a fastpath handler to ensure that KVM doesn't consume stale
state. While it's unlikely KVM will ever consume CR3 or CR0.{TS,MP} in
the fastpath, grabbing the values from the VMCB is inexpensive, i.e. the
risk of subtle bugs far outweighs the reward of deferring reads for a
small subset of VM-Exits.
Note, KVM doesn't currently consume CR3 or CR0.{TS,MP} in the fastpath,
as KVM requires next_rip to be valid (i.e. KVM doesn't read CR3 to decode
the instruction), CR0.MP is never consumed, and CR0.TS is only consumed by
the full emulator.
Reviewed-by: Nikunj A. Dadhania <nikunj@amd.com>
Link: https://patch.msgid.link/20260423162628.490962-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
