diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-01-27 17:43:09 -0800 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-01-30 13:28:29 -0800 |
| commit | 3f2757dbf32a31cef738a983bde6ecd2641484c0 (patch) | |
| tree | aa572f9fa2da7a7306e2a5e0216923ff188b38fd /rust/alloc/collections/git@git.tavy.me:linux.git | |
| parent | 95d848dc7e639988dbb385a8cba9b484607cf98c (diff) | |
KVM: x86: Harden against unexpected adjustments to kvm_cpu_caps
Add a flag to track when KVM is actively configuring its CPU caps, and
WARN if a cap is set or cleared if KVM isn't in its configuration stage.
Modifying CPU caps after {svm,vmx}_set_cpu_caps() can be fatal to KVM, as
vendor setup code expects the CPU caps to be frozen at that point, e.g.
will do additional configuration based on the caps.
Rename kvm_set_cpu_caps() to kvm_initialize_cpu_caps() to pair with the
new "finalize", and to make it more obvious that KVM's CPU caps aren't
fully configured within the function.
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Link: https://patch.msgid.link/20260128014310.3255561-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
