All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: Fix race between reboot and hardware enabling
@ 2023-03-10 22:14 ` Sean Christopherson
  0 siblings, 0 replies; 14+ messages in thread
From: Sean Christopherson @ 2023-03-10 22:14 UTC (permalink / raw)
  To: kvm-riscv

Fix a bug where enabling hardware virtualization can race with a forced
reboot, e.g. `reboot -f`, and result in virt hardware being enabled when
the reboot is attempted, and thus hanging the reboot.

Found by inspection, confirmed by hacking the reboot flow to wait until
KVM loads (the problematic window is ridiculously small).

Tested only on x86, though there would have to be some seriously subtle
arch and/or driver code for this to break other architectures.

Sean Christopherson (2):
  KVM: Use syscore_ops instead of reboot_notifier to hook
    restart/shutdown
  KVM: Don't enable hardware after a restart/shutdown is initiated

 virt/kvm/kvm_main.c | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)


base-commit: 45dd9bc75d9adc9483f0c7d662ba6e73ed698a0b
-- 
2.40.0.rc1.284.g88254d51c5-goog



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

end of thread, other threads:[~2023-03-13 17:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 22:14 [PATCH 0/2] KVM: Fix race between reboot and hardware enabling Sean Christopherson
2023-03-10 22:14 ` Sean Christopherson
2023-03-10 22:14 ` [PATCH 1/2] KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown Sean Christopherson
2023-03-10 22:14   ` Sean Christopherson
2023-03-12 10:12   ` Marc Zyngier
2023-03-12 10:12     ` Marc Zyngier
2023-03-10 22:14 ` [PATCH 2/2] KVM: Don't enable hardware after a restart/shutdown is initiated Sean Christopherson
2023-03-10 22:14   ` Sean Christopherson
2023-03-12 10:21   ` Marc Zyngier
2023-03-12 10:21     ` Marc Zyngier
2023-03-13 15:02     ` Sean Christopherson
2023-03-13 15:02       ` Sean Christopherson
2023-03-13 17:57       ` Marc Zyngier
2023-03-13 17:57         ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.