Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH v1 0/2] KVM: s390: fix migration mode teardown in memslot handling
@ 2026-11-20  7:53 Gautam Gala
  2026-11-20  7:53 ` [PATCH v1 1/2] KVM: s390: reserve mmu cache before stopping migration mode Gautam Gala
  2026-11-20  7:53 ` [PATCH v1 2/2] KVM: s390: make kvm_s390_vm_stop_migration() void Gautam Gala
  0 siblings, 2 replies; 5+ messages in thread
From: Gautam Gala @ 2026-11-20  7:53 UTC (permalink / raw)
  To: kvm
  Cc: linux-s390, linux-kernel, Christian Borntraeger, Janosch Frank,
	Claudio Imbrenda, David Hildenbrand, Steffen Eiden,
	Andreas Grapentin, Marc Zyngier, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle

Two small fixes for migration mode handling in
s390_kvm_mmu_prepare_memory_region().

Patch 1 fixes an error-path bug: if the mmu cache reservation fails
after migration mode was already stopped, the ioctl fails but the CMMA
state cleared by kvm_s390_vm_stop_migration() cannot be restored, so an
in-flight migration aborts over an unrelated allocation failure.
Reserving the cache first keeps both memslots and migration state
untouched on failure.

Patch 2 is a cleanup on top: kvm_s390_vm_stop_migration() cannot fail,
so it returns void and the always-false WARN() at its call site is
dropped.

Gautam Gala (2):
  KVM: s390: reserve mmu cache before stopping migration mode
  KVM: s390: make kvm_s390_vm_stop_migration() void

 arch/s390/kvm/arm64/arm.h    |  3 +--
 arch/s390/kvm/gmap/kvm_mmu.c | 18 ++++++++++--------
 arch/s390/kvm/s390/s390.c    | 10 +++++-----
 arch/s390/kvm/s390/s390.h    |  2 +-
 4 files changed, 17 insertions(+), 16 deletions(-)

-- 
2.56.0


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

end of thread, other threads:[~2026-11-20  7:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20  7:53 [PATCH v1 0/2] KVM: s390: fix migration mode teardown in memslot handling Gautam Gala
2026-11-20  7:53 ` [PATCH v1 1/2] KVM: s390: reserve mmu cache before stopping migration mode Gautam Gala
2026-11-20  7:57   ` sashiko-bot
2026-11-20  7:53 ` [PATCH v1 2/2] KVM: s390: make kvm_s390_vm_stop_migration() void Gautam Gala
2026-11-20  7:58   ` sashiko-bot

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