Skip to content

Commit

Permalink
KVM: cpu_relax() during spin waiting for reboot
Browse files Browse the repository at this point in the history
It doesn't really matter, but if we spin, we should spin in a more relaxed
manner.  This way, if something goes wrong at least it won't contribute to
global warming.

Signed-off-by: Avi Kivity <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
avikivity committed Oct 24, 2010
1 parent 49e9d55 commit 624d84c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void)
/* spin while reset goes on */
local_irq_enable();
while (true)
;
cpu_relax();
}
/* Fault while not rebooting. We want the trace. */
BUG();
Expand Down

0 comments on commit 624d84c

Please sign in to comment.