Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: extract lock_all_vcpus/unlock_all_vcpus
@ 2025-02-11  0:09 Maxim Levitsky
  2025-02-11  0:09 ` [PATCH 1/3] KVM: x86: move sev_lock/unlock_vcpus_for_migration to kvm_main.c Maxim Levitsky
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Maxim Levitsky @ 2025-02-11  0:09 UTC (permalink / raw)
  To: kvm
  Cc: Paolo Bonzini, Jing Zhang, Oliver Upton, linux-arm-kernel,
	Marc Zyngier, linux-kernel, Randy Dunlap, Suzuki K Poulose,
	Palmer Dabbelt, Zenghui Yu, kvm-riscv, Ingo Molnar, linux-riscv,
	Joey Gouly, Paul Walmsley, Maxim Levitsky, Thomas Gleixner,
	Bjorn Helgaas, Albert Ou, kvmarm, Alexander Potapenko, x86,
	Sean Christopherson, Anup Patel, Kunkun Jiang, Atish Patra,
	Catalin Marinas, Will Deacon, Borislav Petkov, Dave Hansen,
	H. Peter Anvin

Implement Paolo's suggestion of reusing
sev_lock/unlock_vcpus_for_migration in arm and riscv code
for the purpose of taking vcpu->mutex of all vcpus of a VM.

Because sev_lock/unlock_vcpus_for_migration already have a workaround
for lockdep max lock depth, this fixes the lockdep warnings on arm
which were the inspiration for this refactoring.

This patch series was only compile tested on all 3 architectures.

Best regards,
	Maxim Levitsky

Maxim Levitsky (3):
  KVM: x86: move sev_lock/unlock_vcpus_for_migration to kvm_main.c
  KVM: arm64: switch to using kvm_lock/unlock_all_vcpus
  RISC-V: KVM: switch to kvm_lock/unlock_all_vcpus

 arch/arm64/include/asm/kvm_host.h     |  3 --
 arch/arm64/kvm/arch_timer.c           |  8 ++--
 arch/arm64/kvm/arm.c                  | 32 -------------
 arch/arm64/kvm/vgic/vgic-init.c       | 11 +++--
 arch/arm64/kvm/vgic/vgic-its.c        | 18 +++----
 arch/arm64/kvm/vgic/vgic-kvm-device.c | 21 ++++----
 arch/riscv/kvm/aia_device.c           | 36 ++------------
 arch/x86/kvm/svm/sev.c                | 65 ++-----------------------
 include/linux/kvm_host.h              |  6 +++
 virt/kvm/kvm_main.c                   | 69 +++++++++++++++++++++++++++
 10 files changed, 115 insertions(+), 154 deletions(-)

-- 
2.26.3



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-02-11 10:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-11  0:09 [PATCH 0/3] KVM: extract lock_all_vcpus/unlock_all_vcpus Maxim Levitsky
2025-02-11  0:09 ` [PATCH 1/3] KVM: x86: move sev_lock/unlock_vcpus_for_migration to kvm_main.c Maxim Levitsky
2025-02-11  0:09 ` [PATCH 2/3] KVM: arm64: switch to using kvm_lock/unlock_all_vcpus Maxim Levitsky
2025-02-11  9:24   ` Marc Zyngier
2025-02-11 10:40     ` Paolo Bonzini
2025-02-11  0:09 ` [PATCH 3/3] RISC-V: KVM: switch to kvm_lock/unlock_all_vcpus Maxim Levitsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox