Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-08-04 Thread Christoffer Dall
On Fri, Aug 01, 2014 at 10:48:36AM +0100, Alex Bennée wrote: Christoffer Dall writes: On Thu, Jul 31, 2014 at 05:45:28PM +0100, Peter Maydell wrote: On 31 July 2014 17:38, Christoffer Dall christoffer.d...@linaro.org wrote: If we are not complaining when setting the pause value to

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-08-04 Thread Christoffer Dall
On Fri, Aug 01, 2014 at 10:11:52AM +0100, Alex Bennée wrote: Christoffer Dall writes: On Thu, Jul 31, 2014 at 04:14:51PM +0100, Alex Bennée wrote: Christoffer Dall writes: On Wed, Jul 09, 2014 at 02:55:12PM +0100, Alex Bennée wrote: To cleanly restore an SMP VM we need to

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-08-04 Thread Christoffer Dall
On Thu, Jul 31, 2014 at 07:21:44PM +0200, Paolo Bonzini wrote: Il 31/07/2014 19:04, Peter Maydell ha scritto: On 31 July 2014 17:57, Paolo Bonzini pbonz...@redhat.com wrote: Il 09/07/2014 15:55, Alex Bennée ha scritto: To cleanly restore an SMP VM we need to ensure that the current pause

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-08-04 Thread Alex Bennée
Christoffer Dall writes: On Thu, Jul 31, 2014 at 07:21:44PM +0200, Paolo Bonzini wrote: Il 31/07/2014 19:04, Peter Maydell ha scritto: On 31 July 2014 17:57, Paolo Bonzini pbonz...@redhat.com wrote: Il 09/07/2014 15:55, Alex Bennée ha scritto: snip No, it's not. It's just the state of

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-08-01 Thread Alex Bennée
Christoffer Dall writes: On Thu, Jul 31, 2014 at 04:14:51PM +0100, Alex Bennée wrote: Christoffer Dall writes: On Wed, Jul 09, 2014 at 02:55:12PM +0100, Alex Bennée wrote: To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded.

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-08-01 Thread Alex Bennée
Christoffer Dall writes: On Thu, Jul 31, 2014 at 05:45:28PM +0100, Peter Maydell wrote: On 31 July 2014 17:38, Christoffer Dall christoffer.d...@linaro.org wrote: If we are not complaining when setting the pause value to false if it was true before, then we probably also need to wake up

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Christoffer Dall
On Wed, Jul 09, 2014 at 02:55:12PM +0100, Alex Bennée wrote: To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded. Things could get confused if the CPU starts running after migration restore completes when it was paused before it state

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Alex Bennée
Christoffer Dall writes: On Wed, Jul 09, 2014 at 02:55:12PM +0100, Alex Bennée wrote: To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded. Things could get confused if the CPU starts running after migration restore completes when it

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Christoffer Dall
On Thu, Jul 31, 2014 at 04:14:51PM +0100, Alex Bennée wrote: Christoffer Dall writes: On Wed, Jul 09, 2014 at 02:55:12PM +0100, Alex Bennée wrote: To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded. Things could get confused if

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Peter Maydell
On 31 July 2014 17:38, Christoffer Dall christoffer.d...@linaro.org wrote: If we are not complaining when setting the pause value to false if it was true before, then we probably also need to wake up the thread in case this is called from another thread, right? or perhaps we should just

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Christoffer Dall
On Thu, Jul 31, 2014 at 05:45:28PM +0100, Peter Maydell wrote: On 31 July 2014 17:38, Christoffer Dall christoffer.d...@linaro.org wrote: If we are not complaining when setting the pause value to false if it was true before, then we probably also need to wake up the thread in case this

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Peter Maydell
On 31 July 2014 17:50, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Jul 31, 2014 at 05:45:28PM +0100, Peter Maydell wrote: Consider the case where the reset state of the system is CPU 0 running, CPUs 1..N stopped, and we're doing an incoming migration to a state where all CPUs

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Paolo Bonzini
Il 09/07/2014 15:55, Alex Bennée ha scritto: To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded. Things could get confused if the CPU starts running after migration restore completes when it was paused before it state was captured.

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Peter Maydell
On 31 July 2014 17:57, Paolo Bonzini pbonz...@redhat.com wrote: Il 09/07/2014 15:55, Alex Bennée ha scritto: To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded. Things could get confused if the CPU starts running after migration

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 19:04, Peter Maydell ha scritto: On 31 July 2014 17:57, Paolo Bonzini pbonz...@redhat.com wrote: Il 09/07/2014 15:55, Alex Bennée ha scritto: To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded. Things could get confused

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Peter Maydell
On 31 July 2014 18:21, Paolo Bonzini pbonz...@redhat.com wrote: What does ARM do if you have a WFI while interrupts are disabled? On x86 after cli;hlt only an NMI will wake you up. With spurious wakeups, it's pretty much guaranteed that you will break such cli;hlt sequences. The

Re: [PATCH] arm64: KVM: export current vcpu-pause state via pseudo regs

2014-07-31 Thread Will Deacon
On Thu, Jul 31, 2014 at 06:36:35PM +0100, Peter Maydell wrote: On 31 July 2014 18:21, Paolo Bonzini pbonz...@redhat.com wrote: What does ARM do if you have a WFI while interrupts are disabled? On x86 after cli;hlt only an NMI will wake you up. With spurious wakeups, it's pretty much