mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
2031f28768
Add wrappers to acquire/release KVM's SRCU lock when stashing the index in vcpu->src_idx, along with rudimentary detection of illegal usage, e.g. re-acquiring SRCU and thus overwriting vcpu->src_idx. Because the SRCU index is (currently) either 0 or 1, illegal nesting bugs can go unnoticed for quite some time and only cause problems when the nested lock happens to get a different index. Wrap the WARNs in PROVE_RCU=y, and make them ONCE, otherwise KVM will likely yell so loudly that it will bring the kernel to its knees. Signed-off-by: Sean Christopherson <seanjc@google.com> Tested-by: Fabiano Rosas <farosas@linux.ibm.com> Message-Id: <20220415004343.2203171-4-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
Kconfig | ||
main.c | ||
Makefile | ||
mmu.c | ||
tlb.S | ||
vcpu_exit.c | ||
vcpu_fp.c | ||
vcpu_sbi_base.c | ||
vcpu_sbi_hsm.c | ||
vcpu_sbi_replace.c | ||
vcpu_sbi_v01.c | ||
vcpu_sbi.c | ||
vcpu_switch.S | ||
vcpu_timer.c | ||
vcpu.c | ||
vm.c | ||
vmid.c |