aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2023-05-12 16:31:26 -0700
committerPaolo Bonzini <[email protected]>2023-05-19 13:56:25 -0400
commit6735150b69978a9f73e3d1bab719e81a5dfafa83 (patch)
treeef516b67d3226182447b70dc00ce6b9a27139b94 /lib/mpi/mpiutil.c
parent39428f6ea9eace95011681628717062ff7f5eb5f (diff)
KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown
Use syscore_ops.shutdown to disable hardware virtualization during a reboot instead of using the dedicated reboot_notifier so that KVM disables virtualization _after_ system_state has been updated. This will allow fixing a race in KVM's handling of a forced reboot where KVM can end up enabling hardware virtualization between kernel_restart_prepare() and machine_restart(). Rename KVM's hook to match the syscore op to avoid any possible confusion from wiring up a "reboot" helper to a "shutdown" hook (neither "shutdown nor "reboot" is completely accurate as the hook handles both). Opportunistically rewrite kvm_shutdown()'s comment to make it less VMX specific, and to explain why kvm_rebooting exists. Cc: Marc Zyngier <[email protected]> Cc: Oliver Upton <[email protected]> Cc: James Morse <[email protected]> Cc: Suzuki K Poulose <[email protected]> Cc: Zenghui Yu <[email protected]> Cc: [email protected] Cc: Huacai Chen <[email protected]> Cc: Aleksandar Markovic <[email protected]> Cc: Anup Patel <[email protected]> Cc: Atish Patra <[email protected]> Cc: [email protected] Signed-off-by: Sean Christopherson <[email protected]> Acked-by: Marc Zyngier <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions