Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-11 Thread Avi Kivity
Marcelo Tosatti wrote: KVM: x86: unhalt vcpu0 on reset Since KVM: x86: do not execute halted vcpus, HLT by vcpu0 before system reset by the IO thread will hang the guest. Mark vcpu as runnable in such case. Applied, thanks. I still want userspace fixed, so please resend the libkvm

Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-10 Thread Avi Kivity
Avi Kivity wrote: Marcelo Tosatti wrote: Offline or uninitialized vcpu's can be executed if requested to perform userspace work. Follow Avi's suggestion to handle halted vcpu's in the main loop, simplifying kvm_emulate_halt(). Introduce a new vcpu-requests bit to indicate events that promote

Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-10 Thread Marcelo Tosatti
On Wed, Sep 10, 2008 at 03:04:10PM +0300, Avi Kivity wrote: Avi Kivity wrote: Marcelo Tosatti wrote: Offline or uninitialized vcpu's can be executed if requested to perform userspace work. Follow Avi's suggestion to handle halted vcpu's in the main loop, simplifying kvm_emulate_halt().

Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-10 Thread Avi Kivity
Marcelo Tosatti wrote: Actually it does reproduce. If you reboot twice, the second reboot will hang during reset (with cs:ip = f000:fff0). Plain Windows XP. OK, easily reproducible by adding a sleep at the start of qemu_kvm_system_reset. The problem is that the vcpu HLT's between

Re: KVM: x86: do not execute halted vcpus (resend)

2008-09-10 Thread Marcelo Tosatti
On Wed, Sep 10, 2008 at 09:42:05PM +0300, Avi Kivity wrote: Marcelo Tosatti wrote: Actually it does reproduce. If you reboot twice, the second reboot will hang during reset (with cs:ip = f000:fff0). Plain Windows XP. OK, easily reproducible by adding a sleep at the start of

KVM: x86: do not execute halted vcpus (resend)

2008-09-08 Thread Marcelo Tosatti
Offline or uninitialized vcpu's can be executed if requested to perform userspace work. Follow Avi's suggestion to handle halted vcpu's in the main loop, simplifying kvm_emulate_halt(). Introduce a new vcpu-requests bit to indicate events that promote state from halted to running. Also