Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-15 Thread Mirela Simonovic
Hi Stefano, On Mon, May 14, 2018 at 6:59 PM, Stefano Stabellini wrote: > On Mon, 14 May 2018, Julien Grall wrote: >> On 11/05/18 22:47, Stefano Stabellini wrote: >> > On Fri, 11 May 2018, Dario Faggioli wrote: >> > > On Fri, 2018-05-11 at 14:08 +0100, Julien Grall wrote: >> > > > The whole idea h

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-14 Thread Stefano Stabellini
On Mon, 14 May 2018, Julien Grall wrote: > On 11/05/18 22:47, Stefano Stabellini wrote: > > On Fri, 11 May 2018, Dario Faggioli wrote: > > > On Fri, 2018-05-11 at 14:08 +0100, Julien Grall wrote: > > > > The whole idea here is we have only one place taking the decision and > > > > we > > > > don't

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-14 Thread Julien Grall
On 11/05/18 22:47, Stefano Stabellini wrote: On Fri, 11 May 2018, Dario Faggioli wrote: On Fri, 2018-05-11 at 14:08 +0100, Julien Grall wrote: The whole idea here is we have only one place taking the decision and we don't spread BUG_ON()/panic/stop_cpu everywhere. The benefit is having only o

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Stefano Stabellini
On Fri, 11 May 2018, Dario Faggioli wrote: > On Fri, 2018-05-11 at 14:08 +0100, Julien Grall wrote: > > The whole idea here is we have only one place taking the decision and > > we > > don't spread BUG_ON()/panic/stop_cpu everywhere. The benefit is > > having > > only one place to fix over multip

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Dario Faggioli
On Fri, 2018-05-11 at 15:44 +0200, Mirela Simonovic wrote: > Hi Dario and Julien, > Err... you've dropped the list and everyone else but me. Re-adding... > Thanks for the feedback to both. > You're welcome. :-) > I think we need to roll back here. I > believe the root cause of this is an attem

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Dario Faggioli
On Fri, 2018-05-11 at 14:08 +0100, Julien Grall wrote: > The whole idea here is we have only one place taking the decision and > we > don't spread BUG_ON()/panic/stop_cpu everywhere. The benefit is > having > only one place to fix over multiple one because very likely the > decision > is the sam

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Dario Faggioli
On Fri, 2018-05-11 at 11:54 +0100, Julien Grall wrote: > On 11/05/18 11:41, Mirela Simonovic wrote: > "We should really avoid to use panic(...) if this is something the > system can survive. In that specific case, it would only affect the > current CPU. So it would be better to return an error an

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Julien Grall
On 11/05/18 13:20, Mirela Simonovic wrote: Hi, On Fri, May 11, 2018 at 2:07 PM, Mirela Simonovic wrote: On Fri, May 11, 2018 at 12:54 PM, Julien Grall wrote: On 11/05/18 11:41, Mirela Simonovic wrote: On Thu, May 10, 2018 at 6:24 PM, Dario Faggioli wrote: On Thu, 2018-05-10 at 17:49 +02

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Dario Faggioli
On Fri, 2018-05-11 at 12:41 +0200, Mirela Simonovic wrote: > Hi Dario, > Hi, > On Thu, May 10, 2018 at 6:24 PM, Dario Faggioli > wrote: > > I may very well be missing or misunderstanding something, but I > > continue to think that the problem here is that CPU_STARTING can't, > > right now, fail,

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Mirela Simonovic
Hi, On Fri, May 11, 2018 at 2:07 PM, Mirela Simonovic wrote: > Hi Julien, > > On Fri, May 11, 2018 at 12:54 PM, Julien Grall wrote: >> >> >> On 11/05/18 11:41, Mirela Simonovic wrote: >>> >>> Hi Dario, >>> >>> On Thu, May 10, 2018 at 6:24 PM, Dario Faggioli >>> wrote: On Thu, 2018-05-

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Mirela Simonovic
Hi Julien, On Fri, May 11, 2018 at 12:54 PM, Julien Grall wrote: > > > On 11/05/18 11:41, Mirela Simonovic wrote: >> >> Hi Dario, >> >> On Thu, May 10, 2018 at 6:24 PM, Dario Faggioli >> wrote: >>> >>> On Thu, 2018-05-10 at 17:49 +0200, Mirela Simonovic wrote: Regardless of the fact th

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Julien Grall
On 11/05/18 11:41, Mirela Simonovic wrote: Hi Dario, On Thu, May 10, 2018 at 6:24 PM, Dario Faggioli wrote: On Thu, 2018-05-10 at 17:49 +0200, Mirela Simonovic wrote: Regardless of the fact that the notifier returns an error or not, I believe it would be good and safe to set priority and do

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-11 Thread Mirela Simonovic
Hi Dario, On Thu, May 10, 2018 at 6:24 PM, Dario Faggioli wrote: > On Thu, 2018-05-10 at 17:49 +0200, Mirela Simonovic wrote: >> Regardless of the fact that the notifier returns an error or not, I >> believe it would be good and safe to set priority and document that >> priority zero would cause

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Dario Faggioli
On Thu, 2018-05-10 at 17:49 +0200, Mirela Simonovic wrote: > Regardless of the fact that the notifier returns an error or not, I > believe it would be good and safe to set priority and document that > priority zero would cause racing issue in the scenario I debugged > today. I'm pretty sure that th

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Dario Faggioli
On Thu, 2018-05-10 at 17:02 +0100, Julien Grall wrote: > On 10/05/18 16:49, Mirela Simonovic wrote: > > Regardless of the fact that the notifier returns an error or not, I > > believe it would be good and safe to set priority and document that > > priority zero would cause racing issue in the scena

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Dario Faggioli
On Thu, 2018-05-10 at 16:13 +0100, Julien Grall wrote: > On 10/05/18 16:00, Mirela Simonovic wrote: > > > If you add your callback to CPU_UP_PREPARE, instead than to > > > CPU_STARTING, SCHED_OP(init_pdata) wouldn't be called, without > > > having > > > to fiddle with priorities. > > This function

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Julien Grall
On 10/05/18 16:49, Mirela Simonovic wrote: Hi Julien, Hi, On Thu, May 10, 2018 at 5:13 PM, Julien Grall wrote: On 10/05/18 16:00, Mirela Simonovic wrote: Hi Dario, On Thu, May 10, 2018 at 4:25 PM, Dario Faggioli wrote: On Thu, 2018-05-10 at 15:24 +0200, Mirela Simonovic wrote: O

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Mirela Simonovic
Hi Julien, On Thu, May 10, 2018 at 5:13 PM, Julien Grall wrote: > > > On 10/05/18 16:00, Mirela Simonovic wrote: >> >> Hi Dario, >> >> On Thu, May 10, 2018 at 4:25 PM, Dario Faggioli >> wrote: >>> >>> On Thu, 2018-05-10 at 15:24 +0200, Mirela Simonovic wrote: On Thu, May 10, 2018 at 1:

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Julien Grall
On 10/05/18 16:00, Mirela Simonovic wrote: Hi Dario, On Thu, May 10, 2018 at 4:25 PM, Dario Faggioli wrote: On Thu, 2018-05-10 at 15:24 +0200, Mirela Simonovic wrote: On Thu, May 10, 2018 at 1:57 PM, Mirela Simonovic Please take a look at function cpu_schedule_callback in schedule.c. With

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Mirela Simonovic
Hi Dario, On Thu, May 10, 2018 at 4:25 PM, Dario Faggioli wrote: > On Thu, 2018-05-10 at 15:24 +0200, Mirela Simonovic wrote: >> On Thu, May 10, 2018 at 1:57 PM, Mirela Simonovic >> >> > Please take a look at function cpu_schedule_callback in schedule.c. >> > Within switch, case CPU_DEAD doesn't

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Julien Grall
On 10/05/18 15:12, Mirela Simonovic wrote: Hi Julien, On Thu, May 10, 2018 at 3:29 PM, Julien Grall wrote: Hi, On 05/10/2018 02:24 PM, Mirela Simonovic wrote: On Thu, May 10, 2018 at 1:57 PM, Mirela Simonovic wrote: I have tested the tuned scenario where enabling capabilities fails -

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Dario Faggioli
On Thu, 2018-05-10 at 15:24 +0200, Mirela Simonovic wrote: > On Thu, May 10, 2018 at 1:57 PM, Mirela Simonovic > > > Please take a look at function cpu_schedule_callback in schedule.c. > > Within switch, case CPU_DEAD doesn't have a break, causing the > > bellow > > CPU_UP_CANCELED to execute as w

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Mirela Simonovic
Hi Julien, On Thu, May 10, 2018 at 3:29 PM, Julien Grall wrote: > Hi, > > On 05/10/2018 02:24 PM, Mirela Simonovic wrote: >> >> On Thu, May 10, 2018 at 1:57 PM, Mirela Simonovic >> wrote: > > >> I have tested the tuned scenario where enabling capabilities fails - >> the erroneous CPU is stopped/

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Dario Faggioli
On Thu, 2018-05-10 at 13:57 +0200, Mirela Simonovic wrote: > Hi, > > +Dario > Thanks. > On Wed, May 9, 2018 at 6:32 PM, Julien Grall > wrote: > > If there is a bug in the scheduler it should be fixed rather trying > > to > > workaround with a panic in the code. If you provide more details, > >

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Julien Grall
Hi, On 05/10/2018 02:24 PM, Mirela Simonovic wrote: On Thu, May 10, 2018 at 1:57 PM, Mirela Simonovic wrote: I have tested the tuned scenario where enabling capabilities fails - the erroneous CPU is stopped/powered down and the system continues to work fine without it. Although I still don't

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Mirela Simonovic
On Thu, May 10, 2018 at 1:57 PM, Mirela Simonovic wrote: > Hi, > > +Dario > > On Wed, May 9, 2018 at 6:32 PM, Julien Grall wrote: >> >> >> On 09/05/18 16:48, Mirela Simonovic wrote: >>> >>> Hi Julien, >> >> >> Hi Mirela, >> >> >>> On Mon, Apr 30, 2018 at 6:09 PM, Julien Grall >>> wrote: >>>

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-10 Thread Mirela Simonovic
Hi, +Dario On Wed, May 9, 2018 at 6:32 PM, Julien Grall wrote: > > > On 09/05/18 16:48, Mirela Simonovic wrote: >> >> Hi Julien, > > > Hi Mirela, > > >> On Mon, Apr 30, 2018 at 6:09 PM, Julien Grall >> wrote: >>> >>> Hi Mirela, >>> >>> >>> On 27/04/18 18:12, Mirela Simonovic wrote: >>

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-09 Thread Julien Grall
On 09/05/18 16:48, Mirela Simonovic wrote: Hi Julien, Hi Mirela, On Mon, Apr 30, 2018 at 6:09 PM, Julien Grall wrote: Hi Mirela, On 27/04/18 18:12, Mirela Simonovic wrote: On boot, enabling errata workarounds will be triggered by the boot CPU from start_xen(). On CPU hotplug (non-boot

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-05-09 Thread Mirela Simonovic
Hi Julien, On Mon, Apr 30, 2018 at 6:09 PM, Julien Grall wrote: > Hi Mirela, > > > On 27/04/18 18:12, Mirela Simonovic wrote: >> >> On boot, enabling errata workarounds will be triggered by the boot CPU >> from start_xen(). On CPU hotplug (non-boot scenario) this would not be >> done. This patch

Re: [Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-04-30 Thread Julien Grall
Hi Mirela, On 27/04/18 18:12, Mirela Simonovic wrote: On boot, enabling errata workarounds will be triggered by the boot CPU from start_xen(). On CPU hotplug (non-boot scenario) this would not be done. This patch adds the code required to enable errata workarounds for a CPU being hotplugged afte

[Xen-devel] [PATCH v3 10/10] xen/arm: Enable errata for secondary CPU on hotplug after the boot

2018-04-27 Thread Mirela Simonovic
On boot, enabling errata workarounds will be triggered by the boot CPU from start_xen(). On CPU hotplug (non-boot scenario) this would not be done. This patch adds the code required to enable errata workarounds for a CPU being hotplugged after the system boots. This is triggered using a notifier. I