diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-27 12:17:06 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-28 06:29:17 -0400 |
| commit | 8e86e73626527e5a69bf5263d6bbe9c2a86b4319 (patch) | |
| tree | d56a6bc701bded71bf3befc233df4f73bd0589a9 /include/linux/kvm_host.h | |
| parent | 4e02d4f9734fa55e3eb18be9b759cd42d93497ec (diff) | |
| parent | 4dbe28c0fabd69842890ba38f185b96664cba26a (diff) | |
| download | lwn-8e86e73626527e5a69bf5263d6bbe9c2a86b4319.tar.gz lwn-8e86e73626527e5a69bf5263d6bbe9c2a86b4319.zip | |
Merge branch 'kvm-lockdep-common' into HEAD
Introduce new mutex locking functions mutex_trylock_nest_lock() and
mutex_lock_killable_nest_lock() and use them to clean up locking
of all vCPUs for a VM.
For x86, this removes some complex code that was used instead
of lockdep's "nest_lock" feature.
For ARM and RISC-V, this removes a lockdep warning when the VM is
configured to have more than MAX_LOCK_DEPTH vCPUs, and removes a fair
amount of duplicate code by sharing the logic across all architectures.
Signed-off-by: Paolo BOnzini <pbonzini@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
| -rw-r--r-- | include/linux/kvm_host.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index c685fb417e92..3bde4fb5c6aa 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -1015,6 +1015,10 @@ static inline struct kvm_vcpu *kvm_get_vcpu_by_id(struct kvm *kvm, int id) void kvm_destroy_vcpus(struct kvm *kvm); +int kvm_trylock_all_vcpus(struct kvm *kvm); +int kvm_lock_all_vcpus(struct kvm *kvm); +void kvm_unlock_all_vcpus(struct kvm *kvm); + void vcpu_load(struct kvm_vcpu *vcpu); void vcpu_put(struct kvm_vcpu *vcpu); |
