linux/arch/powerpc
Sean Christopherson 2031f28768 KVM: Add helpers to wrap vcpu->srcu_idx and yell if it's abused
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>
2022-04-21 13:16:11 -04:00
..
boot powerpc/boot: Add otheros-too-big.bld to .gitignore 2022-02-15 22:29:52 +11:00
configs arch: Remove references to CONFIG_NFSD_V3 in the default configs 2022-03-11 10:25:16 -05:00
crypto powerpc updates for 5.17 2022-01-14 15:17:26 +01:00
include powerpc fixes for 5.18 #2 2022-04-10 07:36:18 -10:00
kernel powerpc fixes for 5.18 #2 2022-04-10 07:36:18 -10:00
kexec powerpc: Move C prototypes out of asm-prototypes.h 2022-03-08 22:06:25 +11:00
kvm KVM: Add helpers to wrap vcpu->srcu_idx and yell if it's abused 2022-04-21 13:16:11 -04:00
lib powerpc updates for 5.18 2022-03-25 09:39:36 -07:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm Revert "powerpc: Set max_mapnr correctly" 2022-04-07 08:54:35 +10:00
net powerpc updates for 5.18 2022-03-25 09:39:36 -07:00
perf powerpc: declare unmodified attribute_group usages const 2022-03-08 22:15:32 +11:00
platforms Driver core changes for 5.18-rc2 2022-04-10 09:55:09 -10:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev pci-v5.18-changes 2022-03-25 13:02:05 -07:00
tools powerpc/64: Add UADDR64 relocation support 2022-03-09 21:47:53 +11:00
xmon powerpc/xmon: Dump XIVE information for online-only processors. 2022-01-06 21:47:00 +11:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc updates for 5.18 2022-03-25 09:39:36 -07:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile Merge branch 'topic/func-desc-lkdtm' into next 2022-03-07 23:34:32 +11:00
Makefile.postlink