diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-04-07 01:53:58 +0300 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-05-13 20:40:49 +0300 |
| commit | 7e985021ef2f6f60bc2fe126978d81a7efa7aeff (patch) | |
| tree | 12cbf76c315c9382656745a00aea605794fad55a /tools/perf/scripts/python | |
| parent | 3c0bf11dd41ffd4206c8ba76d485379e307080e0 (diff) | |
| download | linux-7e985021ef2f6f60bc2fe126978d81a7efa7aeff.tar.xz | |
KVM: x86: Drop superfluous caching of KVM_ASYNC_PF_SEND_ALWAYS
Drop kvm_vcpu_arch.apf.send_always and instead use msr_en_val as the source
of truth to reduce the probability of operating on stale data. This fixes
flaws where KVM fails to update send_always when APF is explicitly
disabled by the guest or implicitly disabled by KVM on INIT. Absent other
bugs, the flaws are benign as KVM *shouldn't* consume send_always when PV
APF support is disabled.
Simply delete the field, as there's zero benefit to maintaining a separate
"cache" of the state.
Opportunistically turn the enabled vs. disabled logic at the end of
kvm_pv_enable_async_pf() into an if-else instead of using an early return,
e.g. so that it's more obvious that both paths are "success" paths.
Fixes: 6adba5274206 ("KVM: Let host know whether the guest can handle async PF in non-userspace context.")
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://patch.msgid.link/20260406225359.1245490-4-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
