mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 23:23:03 +00:00
c09dd2bb57
Register KVM's cpuhp and syscore callbacks when enabling virtualization in hardware, as the sole purpose of said callbacks is to disable and re-enable virtualization as needed. The primary motivation for this series is to simplify dealing with enabling virtualization for Intel's TDX, which needs to enable virtualization when kvm-intel.ko is loaded, i.e. long before the first VM is created. That said, this is a nice cleanup on its own. By registering the callbacks on-demand, the callbacks themselves don't need to check kvm_usage_count, because their very existence implies a non-zero count. Patch 1 (re)adds a dedicated lock for kvm_usage_count. This avoids a lock ordering issue between cpus_read_lock() and kvm_lock. The lock ordering issue still exist in very rare cases, and will be fixed for good by switching vm_list to an (S)RCU-protected list. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
alchemy | ||
ath25 | ||
ath79 | ||
bcm47xx | ||
bcm63xx | ||
bmips | ||
boot | ||
cavium-octeon | ||
cobalt | ||
configs | ||
crypto | ||
dec | ||
fw | ||
generic | ||
include | ||
ingenic | ||
jazz | ||
kernel | ||
kvm | ||
lantiq | ||
lib | ||
loongson2ef | ||
loongson32 | ||
loongson64 | ||
math-emu | ||
mm | ||
mobileye | ||
mti-malta | ||
n64 | ||
net | ||
pci | ||
pic32 | ||
power | ||
ralink | ||
rb532 | ||
sgi-ip22 | ||
sgi-ip27 | ||
sgi-ip30 | ||
sgi-ip32 | ||
sibyte | ||
sni | ||
tools | ||
txx9 | ||
vdso | ||
Kbuild | ||
Kbuild.platforms | ||
Kconfig | ||
Kconfig.debug | ||
Makefile | ||
Makefile.postlink |