Re: [Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-29 Thread Mirela Simonovic
Hi Julien, On Tue, Nov 27, 2018 at 7:36 PM Julien Grall wrote: > > > > On 11/17/18 4:01 PM, Mirela Simonovic wrote: > > Hi, > > Hi Mirela, > > > > > On Sat, Nov 17, 2018 at 12:06 AM Stefano Stabellini > > wrote: > >> > >> On Sat, 17

Re: [Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-17 Thread Mirela Simonovic
Hi, On Sat, Nov 17, 2018 at 5:02 PM Mirela Simonovic wrote: > > On Sat, Nov 17, 2018 at 5:01 PM Mirela Simonovic > wrote: > > > > Hi, > > > > On Sat, Nov 17, 2018 at 12:06 AM Stefano Stabellini > > wrote: > > > > > > On Sat, 17 Nov 201

Re: [Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-17 Thread Mirela Simonovic
On Sat, Nov 17, 2018 at 5:01 PM Mirela Simonovic wrote: > > Hi, > > On Sat, Nov 17, 2018 at 12:06 AM Stefano Stabellini > wrote: > > > > On Sat, 17 Nov 2018, Dario Faggioli wrote: > > > On Fri, 2018-11-16 at 21:58 +, Julien Grall wrote: > > >

Re: [Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-17 Thread Mirela Simonovic
Hi, On Sat, Nov 17, 2018 at 12:06 AM Stefano Stabellini wrote: > > On Sat, 17 Nov 2018, Dario Faggioli wrote: > > On Fri, 2018-11-16 at 21:58 +, Julien Grall wrote: > > > On 16/11/2018 21:41, Mirela Simonovic wrote: > > > > On Fri, Nov 16, 2018 at 8:09 PM

Re: [Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-16 Thread Mirela Simonovic
Hi Stefano, On Fri, Nov 16, 2018 at 8:09 PM Stefano Stabellini wrote: > > On Fri, 16 Nov 2018, Stefano Stabellini wrote: > > On Fri, 16 Nov 2018, Julien Grall wrote: > > > On 16/11/2018 12:34, Mirela Simonovic wrote: > > > > Hi Julien, > > > > > &

Re: [Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-16 Thread Mirela Simonovic
Hi Julien, On Fri, Nov 16, 2018 at 12:44 PM Julien Grall wrote: > > > > On 16/11/2018 11:29, Mirela Simonovic wrote: > > On Fri, Nov 16, 2018 at 11:33 AM Mirela Simonovic > > wrote: > >> > >> Hi Julien, > >> > >> On Thu,

Re: [Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-16 Thread Mirela Simonovic
On Fri, Nov 16, 2018 at 11:33 AM Mirela Simonovic wrote: > > Hi Julien, > > On Thu, Nov 15, 2018 at 9:31 PM Julien Grall wrote: > > > > Hi, > > > > On 11/12/18 11:30 AM, Mirela Simonovic wrote: > > > The resume of Dom0 should always follow Xen's

Re: [Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-16 Thread Mirela Simonovic
Hi Julien, On Thu, Nov 15, 2018 at 9:31 PM Julien Grall wrote: > > Hi, > > On 11/12/18 11:30 AM, Mirela Simonovic wrote: > > The resume of Dom0 should always follow Xen's resume. This is > > done by unblocking the first vCPU of Dom0. > > Please explain

Re: [Xen-devel] [PATCH 05/18] xen/arm: Trigger Xen suspend when Dom0 completes suspend

2018-11-15 Thread Mirela Simonovic
Hi Julien, On Thu, Nov 15, 2018 at 7:23 PM Julien Grall wrote: > > Hi Mirela, > > On 11/12/18 11:30 AM, Mirela Simonovic wrote: > > When Dom0 finalizes its suspend procedure the suspend of Xen is > > triggered by calling system_suspend(). Dom0 finalizes the suspend from &

Re: [Xen-devel] [PATCH 05/18] xen/arm: Trigger Xen suspend when Dom0 completes suspend

2018-11-15 Thread Mirela Simonovic
Hi Julien, On Wed, Nov 14, 2018 at 7:48 PM Julien Grall wrote: > > Hi, > > On 14/11/2018 17:35, Mirela Simonovic wrote: > > On Wed, Nov 14, 2018 at 6:10 PM Julien Grall wrote: > >> On 14/11/2018 15:40, Mirela Simonovic wrote: > >>> On Wed, Nov 14, 2018 at

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Mirela Simonovic
Hi Julien, On Thu, Nov 15, 2018 at 12:38 PM Julien Grall wrote: > > Hi, > > On 11/15/18 11:10 AM, Mirela Simonovic wrote: > > Hi Julien, > > > > On Thu, Nov 15, 2018 at 11:59 AM Julien Grall wrote: > >> > >> Hi Mirela, > >> > >>

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Mirela Simonovic
Hi Julien, On Thu, Nov 15, 2018 at 11:59 AM Julien Grall wrote: > > Hi Mirela, > > On 11/15/18 10:33 AM, Mirela Simonovic wrote: > > On Thu, Nov 15, 2018 at 11:26 AM Andrew Cooper > > wrote: > >> > >> On 15/11/2018 10:13, Julien Grall wrote: > &

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-15 Thread Mirela Simonovic
On Thu, Nov 15, 2018 at 11:26 AM Andrew Cooper wrote: > > On 15/11/2018 10:13, Julien Grall wrote: > > (+ Andre) > > > > On 11/15/18 12:47 AM, Andrew Cooper wrote: > >> On 14/11/2018 12:49, Julien Grall wrote: > >>> Hi Mirela, > >&

Re: [Xen-devel] [PATCH 05/18] xen/arm: Trigger Xen suspend when Dom0 completes suspend

2018-11-14 Thread Mirela Simonovic
Hi Julien, On Wed, Nov 14, 2018 at 6:10 PM Julien Grall wrote: > > Hi Mirela, > > On 14/11/2018 15:40, Mirela Simonovic wrote: > > On Wed, Nov 14, 2018 at 4:07 PM Julien Grall wrote: > >> On 12/11/2018 11:30, Mirela Simonovic wrote: > >>> When Dom0 finaliz

Re: [Xen-devel] [PATCH 05/18] xen/arm: Trigger Xen suspend when Dom0 completes suspend

2018-11-14 Thread Mirela Simonovic
Hi Julien, On Wed, Nov 14, 2018 at 4:07 PM Julien Grall wrote: > > Hi, > > On 12/11/2018 11:30, Mirela Simonovic wrote: > > When Dom0 finalizes its suspend procedure the suspend of Xen is > > triggered by calling system_suspend(). Dom0 finalizes the suspend from > >

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-14 Thread Mirela Simonovic
On Wed, Nov 14, 2018 at 4:36 PM Mirela Simonovic wrote: > > Hi Julien, > > On Wed, Nov 14, 2018 at 3:49 PM Julien Grall wrote: > > > > > > > > On 14/11/2018 13:05, Julien Grall wrote: > > > > > > > > > On 14/11/2018

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-14 Thread Mirela Simonovic
Hi Julien, On Wed, Nov 14, 2018 at 3:49 PM Julien Grall wrote: > > > > On 14/11/2018 13:05, Julien Grall wrote: > > > > > > On 14/11/2018 12:35, Mirela Simonovic wrote: > >> Hi Julien, > > > > Hi, > > > >> > >> On 11/14/2

Re: [Xen-devel] [PATCH 08/18] xen/arm: Disable/enable non-boot physical CPUs on suspend/resume

2018-11-14 Thread Mirela Simonovic
On 11/14/2018 11:52 AM, Julien Grall wrote: Hi Mirela, On 12/11/2018 11:30, Mirela Simonovic wrote: Non-boot CPUs have to be disabled on suspend and enabled on resume (hotplug-based mechanism). Disabling non-boot CPUs will lead to PSCI CPU_OFF to be called by each non-boot CPU. Depending on

Re: [Xen-devel] [PATCH 10/18] xen/arm: Implement GIC suspend/resume functions (gicv2 only)

2018-11-14 Thread Mirela Simonovic
? disable_nonboot_cpus will lead to CPU_OFF PSCI to be called. That is orthogonal to suspend support in this series On 12/11/2018 11:30, Mirela Simonovic wrote: System suspend may lead to a state where GIC would be powered down. Therefore, Xen should save/restore the context of GIC on suspend

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-14 Thread Mirela Simonovic
On 11/13/2018 04:09 PM, Julien Grall wrote: On 13/11/2018 10:23, Julien Grall wrote: Hi, On 12/11/2018 11:30, Mirela Simonovic wrote: +/* + * This function sets the context of current VCPU to the state which is expected + * by the guest on resume. The expected VCPU state is: + * 1) pc

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-14 Thread Mirela Simonovic
Hi Julien, On 11/14/2018 11:45 AM, Julien Grall wrote: Hi, On 13/11/2018 20:39, Stefano Stabellini wrote: On Mon, 12 Nov 2018, Julien Grall wrote: However, what is the issue with saving all the registers here? We need to save arguments that are provided by a guest with system suspend PSCI

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-14 Thread Mirela Simonovic
On 11/13/2018 09:32 AM, Andrew Cooper wrote: On 12/11/2018 19:56, Julien Grall wrote: Hi Andrew, On 11/12/18 4:41 PM, Andrew Cooper wrote: On 12/11/18 16:35, Mirela Simonovic wrote: diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index e594b48d81..7f8105465c 100644 --- a/xen

Re: [Xen-devel] [PATCH 13/18] xen/arm: Implement PSCI SYSTEM_SUSPEND call (physical interface)

2018-11-14 Thread Mirela Simonovic
On Wed, Nov 14, 2018 at 1:14 AM Stefano Stabellini wrote: > > On Mon, 12 Nov 2018, Mirela Simonovic wrote: > > PSCI system suspend function shall be invoked to finalize Xen suspend > > procedure. Resume entry point, which needs to be passed via 1st argument > > of PSCI sy

Re: [Xen-devel] [PATCH 10/18] xen/arm: Implement GIC suspend/resume functions (gicv2 only)

2018-11-14 Thread Mirela Simonovic
On Wed, Nov 14, 2018 at 10:13 AM Julien Grall wrote: > > Hi Stefano, > > On 11/13/18 11:41 PM, Stefano Stabellini wrote: > > On Mon, 12 Nov 2018, Mirela Simonovic wrote: > >> System suspend may lead to a state where GIC would be powered down. > >> Therefore, Xe

Re: [Xen-devel] [PATCH 01/18] xen/arm: Move code that initializes VCPU context into a separate function

2018-11-14 Thread Mirela Simonovic
On Mon, Nov 12, 2018 at 2:15 PM Julien Grall wrote: > > Hi Mirela, > > On 11/12/18 11:30 AM, Mirela Simonovic wrote: > > From: Saeed Nowshadi > > > > The arch_set_info_guest() has code to initialize the context of a VCPU. > > When a VCPU is resumed it

Re: [Xen-devel] [PATCH 05/18] xen/arm: Trigger Xen suspend when Dom0 completes suspend

2018-11-13 Thread Mirela Simonovic
Hi, On Tue, Nov 13, 2018 at 10:43 AM Julien Grall wrote: > > Hi Stefano, > > On 12/11/2018 23:46, Stefano Stabellini wrote: > > On Mon, 12 Nov 2018, Julien Grall wrote: > >> Hi, > >> > >> On 11/12/18 11:30 AM, Mirela Simonovic wrote: > >>>

Re: [Xen-devel] [PATCH 03/18] xen/arm: Save GIC and virtual timer context when the domain suspends

2018-11-12 Thread Mirela Simonovic
Hi Julien, On Mon, Nov 12, 2018 at 6:00 PM Julien Grall wrote: > > > > On 11/12/18 4:52 PM, Mirela Simonovic wrote: > > Hi Julien, > > Hi, > > > Thanks for the feedback. > > > > On Mon, Nov 12, 2018 at 4:36 PM Julien Grall wrote: > >>

Re: [Xen-devel] [PATCH 03/18] xen/arm: Save GIC and virtual timer context when the domain suspends

2018-11-12 Thread Mirela Simonovic
Hi Julien, Thanks for the feedback. On Mon, Nov 12, 2018 at 4:36 PM Julien Grall wrote: > > Hi Mirela, > > On 11/12/18 11:30 AM, Mirela Simonovic wrote: > > GIC and virtual timer context must be saved when the domain suspends. > > Please provide the rationale for thi

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-12 Thread Mirela Simonovic
Hi Julien, Thanks for your feedback, I'll need to answer in iterations. On Mon, Nov 12, 2018 at 4:27 PM Julien Grall wrote: > > Hi Mirela, > > On 11/12/18 11:30 AM, Mirela Simonovic wrote: > > The implementation consists of: > > -Adding PSCI system susp

Re: [Xen-devel] [PATCH 04/18] xen/arm: While a domain is suspended put its watchdogs on pause

2018-11-12 Thread Mirela Simonovic
Hi Jan, On Mon, Nov 12, 2018 at 4:23 PM Jan Beulich wrote: > > >>> On 12.11.18 at 16:17, wrote: > > Hi Jan, > > > > On Mon, Nov 12, 2018 at 12:47 PM Jan Beulich wrote: > >> > >> >>> On 12.11.18 at 12:30, wrote: > >> > --- a/xen/include/xen/timer.h > >> > +++ b/xen/include/xen/timer.h > >> > @@

Re: [Xen-devel] [PATCH 04/18] xen/arm: While a domain is suspended put its watchdogs on pause

2018-11-12 Thread Mirela Simonovic
Hi Jan, On Mon, Nov 12, 2018 at 12:47 PM Jan Beulich wrote: > > >>> On 12.11.18 at 12:30, wrote: > > --- a/xen/include/xen/timer.h > > +++ b/xen/include/xen/timer.h > > @@ -18,6 +18,9 @@ struct timer { > > /* System time expiry value (nanoseconds since boot). */ > > s_time_t expires; >

Re: [Xen-devel] [PATCH 00/18] xen/arm64: Suspend to RAM support for Xen

2018-11-12 Thread Mirela Simonovic
Hi Julien, On Mon, Nov 12, 2018 at 1:08 PM Julien Grall wrote: > > On 11/12/18 12:01 PM, Mirela Simonovic wrote: > > Hi Julien, > > Hi Mirela, > > Please configure your e-mail client to avoid quoting using "space". > Otherwise, this is going to make difficu

Re: [Xen-devel] [PATCH 00/18] xen/arm64: Suspend to RAM support for Xen

2018-11-12 Thread Mirela Simonovic
Hi Julien, On Mon, Nov 12, 2018 at 12:50 PM Julien Grall wrote: > Hi Mirela, > > Thank you for posting the series. Could you provide a branch with the > patch applied? > > I have applied patches on top of upstream/staging. > On 11/12/18 11:30 AM, M

Re: [Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-12 Thread Mirela Simonovic
What? On Mon, Nov 12, 2018 at 12:42 PM Jan Beulich wrote: > >>> On 12.11.18 at 12:30, wrote: > > --- a/xen/include/xen/sched.h > > +++ b/xen/include/xen/sched.h > > @@ -24,6 +24,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > Why

Re: [Xen-devel] [PATCH 00/18] xen/arm64: Suspend to RAM support for Xen

2018-11-12 Thread Mirela Simonovic
Hi, One thing I screwed - I forgot to remove changes log from an internal review, so please ignore it. This is officially the first version. Thanks, Mirela On Mon, Nov 12, 2018 at 12:31 PM Mirela Simonovic < mirela.simono...@aggios.com> wrote: > This series contains support for suspe

[Xen-devel] [PATCH 10/18] xen/arm: Implement GIC suspend/resume functions (gicv2 only)

2018-11-12 Thread Mirela Simonovic
/restored on context switch. Tested on Xilinx Ultrascale+ MPSoC with (and without) powering down the GIC. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/gic-v2.c | 147 ++ xen/arch/arm/gic.c| 27 + xen

[Xen-devel] [PATCH 18/18] xen/arm: Suspend/resume console on Xen suspend/resume

2018-11-12 Thread Mirela Simonovic
This is done using generic console_suspend/resume functions that cause uart driver specific suspend/resume handlers to be called for each initialized port (if the port has suspend/resume driver handlers implemented). Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch

[Xen-devel] [PATCH 13/18] xen/arm: Implement PSCI SYSTEM_SUSPEND call (physical interface)

2018-11-12 Thread Mirela Simonovic
2nd argument of system suspend PSCI call, is unused, as in Linux. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- Changes in v2: -The commit message was stale - referring to the do_suspend function that has been renamed long time ago. Fixed commit message --- xen/arch/arm

[Xen-devel] [PATCH 12/18] xen/arm: Suspend/resume timer interrupt generation

2018-11-12 Thread Mirela Simonovic
timer code to reprogram the EL2 timer as needed. Enabling of EL1 physical timer will be triggered by an entity which uses it. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/suspend.c | 4 xen/arch/arm/time.c| 22 ++ xen

[Xen-devel] [PATCH 14/18] xen/arm: Convert setting MMU page tables code into a routine

2018-11-12 Thread Mirela Simonovic
: Mirela Simonovic --- xen/arch/arm/arm64/head.S | 265 -- 1 file changed, 138 insertions(+), 127 deletions(-) diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index ef87b5c254..f95390dcfe 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen

[Xen-devel] [PATCH 16/18] xen/arm: Save/restore context on suspend/resume

2018-11-12 Thread Mirela Simonovic
that the order of saving register context into cpu_context structure has to match the order of restoring. Since the suspend/resume is supported only for arm64, we define a null cpu_context structure so arm32 could compile. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/

[Xen-devel] [PATCH 05/18] xen/arm: Trigger Xen suspend when Dom0 completes suspend

2018-11-12 Thread Mirela Simonovic
compatibility. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/suspend.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/xen/arch/arm/suspend.c b/xen/arch/arm/suspend.c index f2338e41db..21b45f8248 100644 --- a/xen/arch/arm/suspend.c

[Xen-devel] [PATCH 11/18] xen/arm: Suspend/resume GIC on system suspend/resume

2018-11-12 Thread Mirela Simonovic
, we'll just restore interrupts configuration and abort suspend. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/suspend.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/xen/arch/arm/suspend.c b/xen/arch/arm/suspend.c index 8e8e531d61..b7940

[Xen-devel] [PATCH 15/18] xen/arm: Resume memory management on Xen resume

2018-11-12 Thread Mirela Simonovic
that a mapping cannot be both writable and executable (this was configured prior to suspend). This is done using an existing function (mmu_init_secondary_cpu). Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- Changes in v2: - Patch from v1: "[XEN PATCH 17/21] xen/arm

[Xen-devel] [PATCH 17/18] xen/arm: Resume Dom0 after Xen resumes

2018-11-12 Thread Mirela Simonovic
The resume of Dom0 should always follow Xen's resume. This is done by unblocking the first vCPU of Dom0. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/suspend.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/arm/suspend.c b/xen/arc

[Xen-devel] [PATCH 08/18] xen/arm: Disable/enable non-boot physical CPUs on suspend/resume

2018-11-12 Thread Mirela Simonovic
Xilinx Zynq Ultrascale+ MPSoC (including power down of each non-boot CPU). Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/suspend.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/suspend.c b/xen/arch/arm/suspend.c index

[Xen-devel] [PATCH 01/18] xen/arm: Move code that initializes VCPU context into a separate function

2018-11-12 Thread Mirela Simonovic
be shared with the resume path. Signed-off-by: Saeed Nowshadi Signed-off-by: Mirela Simonovic --- xen/arch/arm/domain.c| 34 +- xen/include/xen/domain.h | 1 + 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch

[Xen-devel] [PATCH 07/18] xen/arm: Freeze domains on suspend and thaw them on resume

2018-11-12 Thread Mirela Simonovic
Freeze and thaw of domains is reused as implemented for x86. In addition, system_state variable is updated to represent the actual state of the system. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/suspend.c | 8 1 file changed, 8 insertions(+) diff

[Xen-devel] [PATCH 09/18] xen/arm: Add rcu_barrier() before enabling non-boot CPUs on resume

2018-11-12 Thread Mirela Simonovic
-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/suspend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/arm/suspend.c b/xen/arch/arm/suspend.c index dae1b1f7d6..8e8e531d61 100644 --- a/xen/arch/arm/suspend.c +++ b/xen/arch/arm/suspend.c @@ -133,6 +133,7 @@ static

[Xen-devel] [PATCH 00/18] xen/arm64: Suspend to RAM support for Xen

2018-11-12 Thread Mirela Simonovic
--- The series does not include: a) UART driver-specific suspend/resume that gets called when console suspends b) SMMU suspend/resume c) Suspend coordination support that would allow dom0 to request domUs to suspend These will be submitted in the following series. Mirela Simonovic (16): xen/a

[Xen-devel] [PATCH 02/18] xen/arm: Implement PSCI system suspend call (virtual interface)

2018-11-12 Thread Mirela Simonovic
is already reset, and contains the right resume entry point in program counter that will be restored in ctxt_switch_to(). The only thing that needs to be done at this point is to clear the variables that marked the domain state as suspended. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowsha

[Xen-devel] [PATCH 04/18] xen/arm: While a domain is suspended put its watchdogs on pause

2018-11-12 Thread Mirela Simonovic
structure. Programming of the timers is triggered when a VCPU of the suspended domain is scheduled in on resume. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- Changes in v2: -Fixed typo in commit message --- xen/arch/arm/domain.c | 1 + xen/arch/arm/suspend.c | 3 +++

[Xen-devel] [PATCH 03/18] xen/arm: Save GIC and virtual timer context when the domain suspends

2018-11-12 Thread Mirela Simonovic
GIC and virtual timer context must be saved when the domain suspends. This is done by moving the respective code in ctxt_switch_from() before the return that happens if the domain suspended. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/arm/domain.c | 14

[Xen-devel] [PATCH 06/18] xen/x86: Move freeze/thaw_domains into common files

2018-11-12 Thread Mirela Simonovic
These functions will be reused by suspend/resume support for ARM. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi --- xen/arch/x86/acpi/power.c | 28 xen/common/domain.c | 29 + xen/include/xen/sched.h | 3 +++ 3

Re: [Xen-devel] [PATCH v5 01/10] xen/arm64: Added handling of the trapped access to OSLSR register

2018-06-07 Thread Mirela Simonovic
Hi Julien, On Tue, Jun 5, 2018 at 8:00 PM, Julien Grall wrote: > > > On 05/06/18 18:24, Julien Grall wrote: > >> Hi Mirela, >> >> On 01/06/18 14:17, Mirela Simonovic wrote: >> >>> Linux/dom0 accesses OSLSR register when saving CPU context during t

Re: [Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-06-07 Thread Mirela Simonovic
Hi, On Wed, Jun 6, 2018 at 8:00 PM, Julien Grall wrote: > (+ Stefano, Mirela, Juergen and Boris) > > On 06/06/18 09:17, moin anjnawala wrote: >> >> Hi Julien, > > > Hi, > >> As you specified earlier I am now able to boot using xen4.10. I am >> using linux4.4 as dom0 as well as domU.In domU, I hav

[Xen-devel] [PATCH v5 06/10] xen/common: Restore IRQ affinity when hotplugging a pCPU

2018-06-01 Thread Mirela Simonovic
fine). However, when non-boot pCPUs are hotplugged on resume, these interrupts are not migrated back to non-boot pCPUs, i.e. IRQ affinity is not restored on resume (this is wrong). This patch adds the restoration of IRQ affinity when a pCPU is hotplugged. Signed-off-by: Mirela Simonovic Reviewed-by:

[Xen-devel] [PATCH v5 05/10] xen/arm: Setup virtual paging for non-boot CPUs on hotplug/resume

2018-06-01 Thread Mirela Simonovic
be added with the suspend to RAM support for ARM, where the hotplug of non-boot CPUs will be triggered via enable_nonboot_cpus() call. Signed-off-by: Mirela Simonovic --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v2: -Fix commit message -Save configured VTCR_EL2 value into static

[Xen-devel] [PATCH v5 01/10] xen/arm64: Added handling of the trapped access to OSLSR register

2018-06-01 Thread Mirela Simonovic
fixed value. Signed-off-by: Mirela Simonovic Reviewed-by: Stefano Stabellini Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v2: - Commit message fix (arm64 related change instead of arm) - Add Stefano's reviewed-by Changes in v3: - Added Julien'

[Xen-devel] [PATCH v5 03/10] xen/arm: Implement CPU_OFF PSCI call (physical interface)

2018-06-01 Thread Mirela Simonovic
lling CPU couldn't be enabled afterwards (stays in WFI loop forever). Note that if the PSCI version is higher than v0.1 the CPU_OFF will be called regardless of the system state. This is done because scenarios other than suspend may benefit from powering off the CPU. Signed-off-by: Mirela Simono

[Xen-devel] [PATCH v5 00/10] xen/arm64: Suspend preconditions and CPU hotplug fixes

2018-06-01 Thread Mirela Simonovic
Dario Faggioli --- Mirela Simonovic (10): xen/arm64: Added handling of the trapped access to OSLSR register xen/arm: Ignore write to GICD_ISACTIVERn registers (vgic-v2) xen/arm: Implement CPU_OFF PSCI call (physical interface) xen/arm: Remove __initdata and __init to enable CPU hotplug xe

[Xen-devel] [PATCH v5 09/10] xen/arm: Free memory allocated for sibling/core maps on CPU hot-unplug

2018-06-01 Thread Mirela Simonovic
. Signed-off-by: Mirela Simonovic Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: -Use notifier to trigger remove_cpu_sibling_map() when the CPU dies. Changes in v4: -Initialize cpu_smpboot notifier at presmp_init rather than init phase to cover the case where

[Xen-devel] [PATCH v5 04/10] xen/arm: Remove __initdata and __init to enable CPU hotplug

2018-06-01 Thread Mirela Simonovic
few data structures and functions that are used within the cpu up flow. Signed-off-by: Mirela Simonovic Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: - Added acked-by Julien --- xen/arch/arm/arm64/smpboot.c | 2 +- xen/arch/arm/irq.c | 2

[Xen-devel] [PATCH v5 07/10] xen/arm: Release maintenance interrupt when CPU is hot-unplugged

2018-06-01 Thread Mirela Simonovic
his patch the interrupt will be released when the CPU_DYING event is received by the callback which is added in gic.c. Signed-off-by: Mirela Simonovic Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: -Add notifier in order to trigger releasing of

[Xen-devel] [PATCH v5 08/10] xen/arm: Disable timers and release their interrupts on CPU hot-unplug

2018-06-01 Thread Mirela Simonovic
->init_timer_interrupt->request_irq). With this patch timers will be disabled and interrupts will be released when the newly added callback receives CPU_DYING event. Signed-off-by: Mirela Simonovic Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: -Trigger releas

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

2018-06-01 Thread Mirela Simonovic
always return success for CPU_STARTING event, or the notify_cpu_starting() and other common code should be fixed to expect an error at CPU_STARTING phase. Signed-off-by: Mirela Simonovic Reviewed-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v4: -Add includes

[Xen-devel] [PATCH v5 02/10] xen/arm: Ignore write to GICD_ISACTIVERn registers (vgic-v2)

2018-06-01 Thread Mirela Simonovic
already handled as 'read as zero'. Signed-off-by: Mirela Simonovic Reviewed-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v2: - Write should be ignored only if the value to be written is zero (in v1 the write was ignored regardless of the value) Cha

Re: [Xen-devel] [PATCH v4 01/10] xen/arm64: Added handling of the trapped access to OSLSR register

2018-05-30 Thread Mirela Simonovic
On Wed, May 30, 2018 at 11:48 AM, Mirela Simonovic < mirela.simono...@aggios.com> wrote: > Hi Julien, > > Thanks for the feedback. > > On Tue, May 29, 2018 at 3:19 PM, Julien Grall > wrote: > >> Hi, >> >> >> On 15/05/18 12:44, Mirela Simonov

Re: [Xen-devel] [PATCH v4 01/10] xen/arm64: Added handling of the trapped access to OSLSR register

2018-05-30 Thread Mirela Simonovic
Hi Julien, Thanks for the feedback. On Tue, May 29, 2018 at 3:19 PM, Julien Grall wrote: > Hi, > > > On 15/05/18 12:44, Mirela Simonovic wrote: > >> Linux/dom0 accesses OSLSR register when saving CPU context during the >> suspend procedure. Xen traps access t

Re: [Xen-devel] [PATCH v4 00/10] xen/arm64: Suspend preconditions and CPU hotplug fixes

2018-05-28 Thread Mirela Simonovic
Hi, Could you please provide feedback for the remaining patches? Thanks, Mirela On Tue, May 15, 2018 at 1:44 PM, Mirela Simonovic < mirela.simono...@aggios.com> wrote: > This patch set contains fixes that are required as precondition for > suspend to > RAM support, including

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

2018-05-15 Thread Mirela Simonovic
always return success for CPU_STARTING event, or the notify_cpu_starting() and other common code should be fixed to expect an error at CPU_STARTING phase. Signed-off-by: Mirela Simonovic --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v4: -Add includes alphabetically -Added newline

[Xen-devel] [PATCH v4 05/10] xen/arm: Setup virtual paging for non-boot CPUs on hotplug/resume

2018-05-15 Thread Mirela Simonovic
be added with the suspend to RAM support for ARM, where the hotplug of non-boot CPUs will be triggered via enable_nonboot_cpus() call. Signed-off-by: Mirela Simonovic --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v2: -Fix commit message -Save configured VTCR_EL2 value into static

[Xen-devel] [PATCH v4 01/10] xen/arm64: Added handling of the trapped access to OSLSR register

2018-05-15 Thread Mirela Simonovic
. Signed-off-by: Mirela Simonovic Reviewed-by: Stefano Stabellini Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v2: - Commit message fix (arm64 related change instead of arm) - Add Stefano's reviewed-by Changes in v3: - Added Julien's acked-by --- xe

[Xen-devel] [PATCH v4 04/10] xen/arm: Remove __initdata and __init to enable CPU hotplug

2018-05-15 Thread Mirela Simonovic
few data structures and functions that are used within the cpu up flow. Signed-off-by: Mirela Simonovic Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: - Added acked-by Julien --- xen/arch/arm/arm64/smpboot.c | 2 +- xen/arch/arm/irq.c | 2

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

[Xen-devel] [PATCH v4 08/10] xen/arm: Disable timers and release their interrupts on CPU hot-unplug

2018-05-15 Thread Mirela Simonovic
->init_timer_interrupt->request_irq). With this patch timers will be disabled and interrupts will be released when the newly added callback receives CPU_DYING event. Signed-off-by: Mirela Simonovic --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: -Trigger releasing of timer interrupts

[Xen-devel] [PATCH v4 09/10] xen/arm: Free memory allocated for sibling/core maps on CPU hot-unplug

2018-05-15 Thread Mirela Simonovic
. Signed-off-by: Mirela Simonovic --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: -Use notifier to trigger remove_cpu_sibling_map() when the CPU dies. Changes in v4: -Initialize cpu_smpboot notifier at presmp_init rather than init phase to cover the case where a secondary CPU dies

[Xen-devel] [PATCH v4 03/10] xen/arm: Implement CPU_OFF PSCI call (physical interface)

2018-05-15 Thread Mirela Simonovic
lling CPU couldn't be enabled afterwards (stays in WFI loop forever). Note that if the PSCI version is higher than v0.1 the CPU_OFF will be called regardless of the system state. This is done because scenarios other than suspend may benefit from powering off the CPU. Signed-off-by: Mirela Simono

[Xen-devel] [PATCH v4 00/10] xen/arm64: Suspend preconditions and CPU hotplug fixes

2018-05-15 Thread Mirela Simonovic
n the last patch of the series errata notifier now returns an error --- CC: Stefano Stabellini CC: Julien Grall CC: George Dunlap CC: Dario Faggioli --- Mirela Simonovic (10): xen/arm64: Added handling of the trapped access to OSLSR register xen/arm: Ignore write to GICD_ISACTIVERn registers

[Xen-devel] [PATCH v4 02/10] xen/arm: Ignore write to GICD_ISACTIVERn registers (vgic-v2)

2018-05-15 Thread Mirela Simonovic
already handled as 'read as zero'. Signed-off-by: Mirela Simonovic Reviewed-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v2: - Write should be ignored only if the value to be written is zero (in v1 the write was ignored regardless of the value) Cha

[Xen-devel] [PATCH v4 06/10] xen/common: Restore IRQ affinity when hotplugging a pCPU

2018-05-15 Thread Mirela Simonovic
fine). However, when non-boot pCPUs are hotplugged on resume, these interrupts are not migrated back to non-boot pCPUs, i.e. IRQ affinity is not restored on resume (this is wrong). This patch adds the restoration of IRQ affinity when a pCPU is hotplugged. Signed-off-by: Mirela Simonovic Reviewed-by:

[Xen-devel] [PATCH v4 07/10] xen/arm: Release maintenance interrupt when CPU is hot-unplugged

2018-05-15 Thread Mirela Simonovic
his patch the interrupt will be released when the CPU_DYING event is received by the callback which is added in gic.c. Signed-off-by: Mirela Simonovic Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: -Add notifier in order to trigger releasing of

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 a

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,

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 >> prio

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, Mi

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. >> > Wit

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

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 Mirel

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: >>> >>>

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 wo

Re: [Xen-devel] [PATCH v2 07/10] xen/arm: Release maintenance interrupt when CPU is hot-unplugged

2018-05-09 Thread Mirela Simonovic
Hi Julien, On Wed, May 9, 2018 at 1:01 PM, Julien Grall wrote: > > > On 09/05/18 11:10, Mirela Simonovic wrote: >> >> On Fri, Apr 27, 2018 at 5:12 PM, Julien Grall >> wrote: >>> >>> On 27/04/18 15:38, Mirela Simonovic wrote: >>>>

Re: [Xen-devel] [PATCH v2 07/10] xen/arm: Release maintenance interrupt when CPU is hot-unplugged

2018-05-09 Thread Mirela Simonovic
Hi Julien, On Fri, Apr 27, 2018 at 5:12 PM, Julien Grall wrote: > > > On 27/04/18 15:38, Mirela Simonovic wrote: >> >> Hi, >> >> On Fri, Apr 27, 2018 at 4:15 PM, Tim Deegan wrote: >>> >>> Hi, >>> >>> At 10:28 +0100 on 27 A

Re: [Xen-devel] [PATCH v3 05/10] xen/arm: Setup virtual paging for non-boot CPUs on hotplug/resume

2018-05-08 Thread Mirela Simonovic
Hi Julien, On Tue, May 8, 2018 at 4:14 PM, Julien Grall wrote: > > > On 07/05/18 15:55, Mirela Simonovic wrote: >> >> Hi Julien, > > > Hi Mirela, > >> On Mon, Apr 30, 2018 at 4:47 PM, Julien Grall >> wrote: >>> >>> On 27/04/18

Re: [Xen-devel] [PATCH v3 08/10] xen/arm: Release timer interrupts when CPU is hot-unplugged

2018-05-07 Thread Mirela Simonovic
Hi Julien, On Mon, Apr 30, 2018 at 5:58 PM, Julien Grall wrote: > Hi, > > > On 27/04/18 18:12, Mirela Simonovic wrote: >> >> When a CPU is hot-unplugged timer interrupts have to be released >> in order to free the memory that was allocated when the interrupts >&g

Re: [Xen-devel] [PATCH v3 05/10] xen/arm: Setup virtual paging for non-boot CPUs on hotplug/resume

2018-05-07 Thread Mirela Simonovic
Hi Julien, On Mon, Apr 30, 2018 at 4:47 PM, Julien Grall wrote: > Hi Mirela, > > > On 27/04/18 18:12, Mirela Simonovic wrote: >> >> In existing code the virtual paging for non-boot CPUs is setup only on >> boot. >> The setup is triggered from start_xen() afte

[Xen-devel] [PATCH v3 01/10] xen/arm64: Added handling of the trapped access to OSLSR register

2018-04-27 Thread Mirela Simonovic
. Signed-off-by: Mirela Simonovic Reviewed-by: Stefano Stabellini Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v2: - Commit message fix (arm64 related change instead of arm) - Add Stefano's reviewed-by Changes in v3: - Added Julien's acked-by --- xe

[Xen-devel] [PATCH v3 02/10] xen/arm: Ignore write to GICD_ISACTIVERn registers (vgic-v2)

2018-04-27 Thread Mirela Simonovic
already handled as 'read as zero'. Signed-off-by: Mirela Simonovic --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v2: - Write should be ignored only if the value to be written is zero (in v1 the write was ignored regardless of the value) Changes in v3: - Print warning o

[Xen-devel] [PATCH v3 00/10] xen/arm64: Suspend preconditions and CPU hotplug fixes

2018-04-27 Thread Mirela Simonovic
gioli --- Mirela Simonovic (10): xen/arm64: Added handling of the trapped access to OSLSR register xen/arm: Ignore write to GICD_ISACTIVERn registers (vgic-v2) xen/arm: Implement CPU_OFF PSCI call (physical interface) xen/arm: Remove __initdata and __init to enable CPU hotplug xen/arm: Setup vi

[Xen-devel] [PATCH v3 09/10] xen/arm: Free memory allocated for sibling/core maps on CPU hot-unplug

2018-04-27 Thread Mirela Simonovic
. Signed-off-by: Mirela Simonovic --- CC: Stefano Stabellini CC: Julien Grall --- Changes in v3: -Use notifier to trigger remove_cpu_sibling_map() when the CPU dies. --- xen/arch/arm/smpboot.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/xen/arch/arm

  1   2   >