linux/arch/loongarch/kvm
Paolo Bonzini c09dd2bb57 Merge branch 'kvm-redo-enable-virt' into HEAD
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>
2024-09-17 11:38:20 -04:00
..
exit.c LoongArch: KVM: Enable paravirt feature control from VMM 2024-09-12 20:53:40 +08:00
interrupt.c LoongArch: KVM: Implement vcpu interrupt operations 2023-10-02 10:01:28 +08:00
Kconfig LoongArch: KVM: Add PV steal time support in host side 2024-07-09 16:25:51 +08:00
main.c KVM: Rename arch hooks related to per-CPU virtualization enabling 2024-09-04 11:02:33 -04:00
Makefile kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
mmu.c LoongArch: Use accessors to page table entries instead of direct dereference 2024-08-07 17:37:11 +08:00
switch.S LoongArch: Add ifdefs to fix LSX and LASX related warnings 2024-08-26 23:11:32 +08:00
timer.c LoongArch: KVM: Invalidate guest steal time address on vCPU reset 2024-08-26 23:11:32 +08:00
tlb.c LoongArch: KVM: Delay secondary mmu tlb flush until guest entry 2024-07-09 16:25:50 +08:00
trace.h LoongArch: KVM: Add mmio trace events support 2024-05-06 22:00:47 +08:00
vcpu.c LoongArch: KVM: Enable paravirt feature control from VMM 2024-09-12 20:53:40 +08:00
vm.c LoongArch: KVM: Enable paravirt feature control from VMM 2024-09-12 20:53:40 +08:00