Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-04-11 Thread Steven Price
On 11/04/2019 08:27, Heyi Guo wrote: > Hi Steve, > > After reading kernel code about time keeping and something related, I've > not got a clear picture of how we can use MSR_KVM_WALL_CLOCK_NEW to keep > wall clock in guest VM. > > 1. On X86, MSR_KVM_WALL_CLOCK_NEW is only used by the callback of

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-04-11 Thread Heyi Guo
Hi Steve, After reading kernel code about time keeping and something related, I've not got a clear picture of how we can use MSR_KVM_WALL_CLOCK_NEW to keep wall clock in guest VM. 1. On X86, MSR_KVM_WALL_CLOCK_NEW is only used by the callback of system suspend and resume; I didn't find it use

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-26 Thread Steven Price
Hi Heyi, On 26/03/2019 13:53, Heyi Guo wrote: > I also tested save/restore operations, and observed that clock in guest > would not jump after restoring either. If we consider guest clock not > being synchronized with real wall clock as an issue, does it mean > save/restore function has the same i

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-26 Thread Heyi Guo
I also tested save/restore operations, and observed that clock in guest would not jump after restoring either. If we consider guest clock not being synchronized with real wall clock as an issue, does it mean save/restore function has the same issue? Thanks, Heyi On 2019/3/26 19:54, Heyi Guo

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-26 Thread Heyi Guo
Hi Steven, Thanks for your explanation. Please see my comments below. On 2019/3/21 0:29, Steven Price wrote: On 19/03/2019 14:39, Heyi Guo wrote: Hi Christoffer and Steve, On 2019/3/15 16:59, Christoffer Dall wrote: Hi Steve, On Wed, Mar 13, 2019 at 10:11:30AM +, Steven Price wrote:

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-20 Thread Steven Price
On 19/03/2019 14:39, Heyi Guo wrote: > Hi Christoffer and Steve, > > > On 2019/3/15 16:59, Christoffer Dall wrote: >> Hi Steve, >> >> On Wed, Mar 13, 2019 at 10:11:30AM +, Steven Price wrote: >>> Personally I think what we need is: >>> >>> * Either a patch like the one from Heyi Guo (save/res

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-19 Thread Heyi Guo
Hi Christoffer and Steve, On 2019/3/15 16:59, Christoffer Dall wrote: Hi Steve, On Wed, Mar 13, 2019 at 10:11:30AM +, Steven Price wrote: Personally I think what we need is: * Either a patch like the one from Heyi Guo (save/restore CNTVCT_EL0) or alternatively hooking up KVM_KVMCLOCK_CTR

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-15 Thread Christoffer Dall
Hi Steve, On Wed, Mar 13, 2019 at 10:11:30AM +, Steven Price wrote: > > Personally I think what we need is: > > * Either a patch like the one from Heyi Guo (save/restore CNTVCT_EL0) or > alternatively hooking up KVM_KVMCLOCK_CTRL to prevent the watchdog > firing when user space explicitly st

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-14 Thread Heyi Guo
Hi Peter and Steven, On 2019/3/13 18:11, Steven Price wrote: On 12/03/2019 14:12, Marc Zyngier wrote: Hi Peter, On 12/03/2019 10:08, Peter Maydell wrote: On Tue, 12 Mar 2019 at 06:10, Heyi Guo wrote: When we stop a VM for more than 30 seconds and then resume it, by qemu monitor command "st

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-13 Thread Heyi Guo
Dear all, Really appreciate your comments and information. For "Live Physical Time", is there any document to tell the whole story? And may I know the timeline to make it happen? Thanks, Heyi On 2019/3/12 22:12, Marc Zyngier wrote: Hi Peter, On 12/03/2019 10:08, Peter Maydell wrote: On Tu

Re: Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-13 Thread Steven Price
On 13/03/2019 01:57, Heyi Guo wrote: > Dear all, > > Really appreciate your comments and information. For "Live Physical > Time", is there any document to tell the whole story? And may I know the > timeline to make it happen? The documentation is available here: https://developer.arm.com/docs/den

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-13 Thread Steven Price
On 12/03/2019 14:12, Marc Zyngier wrote: > Hi Peter, > > On 12/03/2019 10:08, Peter Maydell wrote: >> On Tue, 12 Mar 2019 at 06:10, Heyi Guo wrote: >>> >>> When we stop a VM for more than 30 seconds and then resume it, by qemu >>> monitor command "stop" and "cont", Linux on VM will complain of "s

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-12 Thread Marc Zyngier
Hi Peter, On 12/03/2019 10:08, Peter Maydell wrote: > On Tue, 12 Mar 2019 at 06:10, Heyi Guo wrote: >> >> When we stop a VM for more than 30 seconds and then resume it, by qemu >> monitor command "stop" and "cont", Linux on VM will complain of "soft >> lockup - CPU#x stuck for xxs!" as below: >>

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-12 Thread Christoffer Dall
[Adding Steven Price, who has recently looked at this, in cc] On Tue, Mar 12, 2019 at 10:08:47AM +, Peter Maydell wrote: > On Tue, 12 Mar 2019 at 06:10, Heyi Guo wrote: > > > > When we stop a VM for more than 30 seconds and then resume it, by qemu > > monitor command "stop" and "cont", Linux

Re: [RFC] arm/cpu: fix soft lockup panic after resuming from stop

2019-03-12 Thread Peter Maydell
On Tue, 12 Mar 2019 at 06:10, Heyi Guo wrote: > > When we stop a VM for more than 30 seconds and then resume it, by qemu > monitor command "stop" and "cont", Linux on VM will complain of "soft > lockup - CPU#x stuck for xxs!" as below: > > [ 2783.809517] watchdog: BUG: soft lockup - CPU#3 stuck fo