summaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2024-02-09 14:20:47 -0800
committerSean Christopherson <seanjc@google.com>2024-02-22 16:24:26 -0800
commitfc3c94142b3a4391cab94adde56fcfbea25723e5 (patch)
treee07faa5ac0cf3d87f0d876b4e53be5271a440af3 /rust
parenta78d9046696b88079a5696bccec4e4e439a3f2a2 (diff)
downloadlinux-stable-fc3c94142b3a4391cab94adde56fcfbea25723e5.tar.gz
linux-stable-fc3c94142b3a4391cab94adde56fcfbea25723e5.tar.bz2
linux-stable-fc3c94142b3a4391cab94adde56fcfbea25723e5.zip
KVM: x86: Sanity check that kvm_has_noapic_vcpu is zero at module_exit()
WARN if kvm.ko is unloaded with an elevated kvm_has_noapic_vcpu to guard against incorrect management of the key, e.g. to detect if KVM fails to decrement the key in error paths. Because kvm_has_noapic_vcpu is purely an optimization, in all likelihood KVM could completely botch handling of kvm_has_noapic_vcpu and no one would notice (which is a good argument for deleting the key entirely, but that's a problem for another day). Note, ideally the sanity check would be performance when kvm_usage_count goes to zero, but adding an arch callback just for this sanity check isn't at all worth doing. Link: https://lore.kernel.org/r/20240209222047.394389-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions