I've been looking at the guest reboot problem, which currently reboots the host on svm when a Linux guest issues "# shutdown -r now". (By the way, with a Linux guest, the rebooting can be worked around by adding the kernel parameter reboot=b to the guest, this makes Linux use an alternative reboot method which doesn't cause the host to reboot under kvm-11). The patch below stops the rebooting of the host and handles the request to reboot the guest in an orderly fashion, so it's a big step forward, but it doesn't yet succeed in rebooting of the guest, instead the VM exits. The basic approach is to intercept the shutdown. The patch includes some possible alternatives to reboot, while searching for the best approach: 1) Call kvm_qemu_destroy(); and immediately after kvm_qemu_create_context(); 2) New ioctl to reset a vcpu 3) I also tried calling init_vmcb from shutdown_intercept, but that had no noticable effect Method 1 seems promising, but currently results in kvm exiting due to "do_interrupt: unexpect" errors. Method 2 currently results in vmrun returning KVM_EXIT_TYPE_FAIL_ENTRY. - Both of methods 1 and 2 need an API version bump - This code is safe to run without having to fear a host reboot - SVM only, at the moment - svm_reset_vcpu() was initially just the one-line call to init_vmcb(), there's some leftover cruft now... - A printf has been added to cpu_reset(), if this prints, qemu has called all registered reset handlers. Please comment. The Patch is relative to kvm-11.