Re: [Xen-devel] [PATCH] Revert xen: dont fiddle with event channel masking in suspend/resume

2018-05-15 Thread Anchal Agarwal
O Fri, Apr 20, 2018 at 07:43:31AM +0200, Juergen Gross wrote: > On 20/04/18 01:04, Anchal Agarwal wrote: > > > > Hello, > > > > This patch reverts commit e91b2b1194335ca83d8a40fa4e0efd480bf2babe. > > evtchn are supposed to be masked during re

[Xen-devel] [RFC PATCH 03/12] xenbus: add freeze/thaw/restore callbacks support

2018-06-12 Thread Anchal Agarwal
Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed-by: Munehisa Kamata Reviewed-by: Eduardo Valentin --- drivers/xen/xenbus/xenbus_probe.c | 102 -- include/xen/xenbus.h | 3 ++ 2 files changed, 89 insertions(+), 16 deletions(-)

[Xen-devel] [RFC PATCH 05/12] x86/xen: add system core suspend and resume callbacks

2018-06-12 Thread Anchal Agarwal
from the context. So if the callbacks are called from Xen suspend context, return immediately. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed-by: Munehisa Kamata Reviewed-by: Eduardo Valentin --- arch/x86/xen/enlighten_hvm.c | 1 + arch/x86/xen/suspend.c | 53

[Xen-devel] [RFC PATCH 02/12] xen/manage: introduce helper function to know the on-going suspend mode

2018-06-12 Thread Anchal Agarwal
From: Munehisa Kamata Introduce simple functions which help to know the on-going suspend mode so that other Xen-related code can behave differently according to the current suspend mode. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed-by: Alakesh Haloi Reviewed

[Xen-devel] [RFC PATCH 01/12] xen/manage: keep track of the on-going suspend mode

2018-06-12 Thread Anchal Agarwal
, acquirng pm_mutex is still right thing to do, and we would need to modify Xen shutdown code to avoid the issue. This will be fixed by a separate patch. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed-by: Sebastian Biemueller Reviewed-by: Munehisa Kamata Reviewed-by: Eduardo

[Xen-devel] [RFC PATCH 09/12] x86/xen: save and restore steal clock

2018-06-12 Thread Anchal Agarwal
then. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed-by: Munehisa Kamata Reviewed-by: Eduardo Valentin --- arch/x86/xen/suspend.c | 13 - arch/x86/xen/time.c| 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/x86/xen/suspend.c b

[Xen-devel] [RFC PATCH 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2018-06-12 Thread Anchal Agarwal
ng to work with broader backends. Signed-off-by: Anchal Agarwal Reviewed-by: Munehisa Kamata Reviewed-by: Eduardo Valentin --- drivers/block/xen-blkfront.c | 158 +-- 1 file changed, 151 insertions(+), 7 deletions(-) diff --git a/drivers/block/xen-blkfront.c

[Xen-devel] [RFC PATCH 12/12] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA

2018-06-12 Thread Anchal Agarwal
the data is written out) in the validation of the swap signature in mark_swapfiles(). Before this patch, the command line processing was the only place where swsusp_resume_block was set. Signed-off-by: Aleksei Besogonov Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed

[Xen-devel] [RFC PATCH 00/12] Enable PM hibernation on guest VMs

2018-06-12 Thread Anchal Agarwal
Anchal Agarwal (1): x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume Munehisa Kamata (10): xen/manage: keep track of the on-going suspend mode xen/manage: introduce helper function to know the on-going suspend mode xenbus: add freeze/thaw/restore callbacks support

[Xen-devel] [RFC PATCH 04/12] x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume

2018-06-12 Thread Anchal Agarwal
-by: Anchal Agarwal Reviewed-by: Sebastian Biemueller Reviewed-by: Munehisa Kamata Reviewed-by: Eduardo Valentin CR: https://cr.amazon.com/r/8273203/ --- arch/x86/xen/enlighten_hvm.c | 7 +++ arch/x86/xen/xen-ops.h | 1 + 2 files changed, 8 insertions(+) diff --git a/arch/x86/xen

[Xen-devel] [RFC PATCH 08/12] xen-time-introduce-xen_-save-restore-_steal_clock

2018-06-12 Thread Anchal Agarwal
number. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed-by: Munehisa Kamata Reviewed-by: Eduardo Valentin --- drivers/xen/time.c| 28 +++- include/xen/xen-ops.h | 2 ++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/xen

[Xen-devel] [RFC PATCH 11/12] x86/xen: close event channels for PIRQs in system core suspend callback

2018-06-12 Thread Anchal Agarwal
Signed-off-by: Anchal Agarwal Reviewed-by: Munehisa Kamata Reviewed-by: Eduardo Valentin --- arch/x86/xen/suspend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c index dae0f74..affa63d 100644 --- a/arch/x86/xen/suspend.c +++ b/arch/x86/xen

[Xen-devel] [RFC PATCH 07/12] xen-netfront: add callbacks for PM suspend and hibernation support

2018-06-12 Thread Anchal Agarwal
, longer default timeout seems a bit more reasonable here to avoid hitting the timeout. Also, make it configurable via module parameter so that we can cover broader setups than what we know currently. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed-by: Eduardo Valentin Reviewed

[Xen-devel] [RFC PATCH 10/12] xen/events: add xen_shutdown_pirqs helper function

2018-06-12 Thread Anchal Agarwal
From: Munehisa Kamata Add a simple helper function to "shutdown" active PIRQs, which actually closes event channels but keeps related IRQ structures intact. PM suspend/hibernation code will rely on this. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal Reviewed-by: Muneh

Re: [Xen-devel] [RFC PATCH 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2018-06-13 Thread Anchal Agarwal
fer for guest to resume from hibernation. Thanks, Anchal On Wed, Jun 13, 2018 at 10:24:28AM +0200, Roger Pau Monn?? wrote: > On Tue, Jun 12, 2018 at 08:56:13PM +, Anchal Agarwal wrote: > > From: Munehisa Kamata > > > > Add freeze and restore callbacks for PM suspend and h

[Xen-devel] [PATCH] Revert xen: dont fiddle with event channel masking in suspend/resume

2018-04-19 Thread Anchal Agarwal
? finish_wait+0x80/0x80 ? auditd_reset+0x90/0x90 kthread+0x11a/0x130 ? kthread_create_on_node+0x70/0x70 ? call_usermodehelper_exec_async+0x12a/0x160 ret_from_fork+0x35/0x40 RIP: dummy_handler+0x0/0x10 RSP: 880207203eb8 Signed-off-by: Anchal Agarwal <ancha...@amazon.com> Signed-off-by: E

Re: [Xen-devel] [PATCH] xen/netfront: Remove unneeded .resume callback

2019-03-28 Thread Anchal Agarwal
On Wed, Mar 27, 2019 at 08:40:20AM +0200, Oleksandr Andrushchenko wrote: > On 3/25/19 7:30 PM, Anchal Agarwal wrote: > >On Fri, Mar 22, 2019 at 10:44:33AM +, Oleksandr Andrushchenko wrote: > >>On 3/20/19 5:50 AM, Munehisa Kamata wrote: > >>>On 3/18/2019 3:02 AM,

Re: [Xen-devel] [PATCH] xen/netfront: Remove unneeded .resume callback

2019-03-25 Thread Anchal Agarwal
On Fri, Mar 22, 2019 at 10:44:33AM +, Oleksandr Andrushchenko wrote: > > On 3/20/19 5:50 AM, Munehisa Kamata wrote: > > On 3/18/2019 3:02 AM, Oleksandr Andrushchenko wrote: > >> +Amazon > >> pls see inline > > Hi Oleksandr, > > > > Let me add some comments as the original author of the

Re: [Xen-devel] [PATCH] xen/netfront: Remove unneeded .resume callback

2019-03-21 Thread Anchal Agarwal
On Tue, Mar 19, 2019 at 08:50:05PM -0700, Munehisa Kamata wrote: > On 3/18/2019 3:02 AM, Oleksandr Andrushchenko wrote: > > +Amazon > > pls see inline > Hi Oleksandr, > > Let me add some comments as the original author of the series. > > > > > On 3/14/19 9:00 PM, Julien Grall wrote: > >> Hi, >

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-17 Thread Anchal Agarwal
On Mon, Feb 17, 2020 at 11:05:09AM +0100, Roger Pau Monné wrote: > On Fri, Feb 14, 2020 at 11:25:34PM +0000, Anchal Agarwal wrote: > > From: Munehisa Kamata > > > Add freeze, thaw and restore callbacks for PM suspend and hibernation > > support. All frontend d

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-19 Thread Anchal Agarwal
On Tue, Feb 18, 2020 at 10:16:11AM +0100, Roger Pau Monné wrote: > On Mon, Feb 17, 2020 at 11:05:53PM +0000, Anchal Agarwal wrote: > > On Mon, Feb 17, 2020 at 11:05:09AM +0100, Roger Pau Monné wrote: > > > On Fri, Feb 14, 2020 at 11:25:34PM +0000, Anchal Agarwal wrote: >

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-20 Thread Anchal Agarwal
.org; fllin...@amaozn.com; Kamata, Munehisa > > > > > > ; mi...@redhat.com; xen- > > > > de...@lists.xenproject.org; > > > > > > Singh, Balbir ; ax...@kernel.dk; > > > > > > konrad.w...@oracle.com; b...@alien8.de; boris.ostro

[Xen-devel] [RFC RESEND PATCH v3 00/12] Enable PM hibernation on guest VMs

2020-02-14 Thread Anchal Agarwal
(f.fileno(), 0x01, buf) print buf[0] " Aleksei Besogonov (1): PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA Anchal Agarwal (4): x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume genirq: Shutdown irq chips in suspend/resume during hibernation xen:

[Xen-devel] [RFC PATCH v3 01/12] xen/manage: keep track of the on-going suspend mode

2020-02-14 Thread Anchal Agarwal
the issue. [Anchal Changelog: Merged patch xen/manage: introduce helper function to know the on-going suspend mode into this one for better readability] Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata --- drivers/xen/manage.c | 73 +++ include/xen

[Xen-devel] [RFC PATCH v3 03/12] x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume

2020-02-12 Thread Anchal Agarwal
-by: Anchal Agarwal --- Changes since V2: None --- arch/x86/xen/enlighten_hvm.c | 7 +++ arch/x86/xen/xen-ops.h | 1 + 2 files changed, 8 insertions(+) diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c index e138f7de52d2..75b1ec7a0fcd 100644 --- a/arch/x86/xen

[Xen-devel] [RFC PATCH v3 05/12] xen-netfront: add callbacks for PM suspend and hibernation support

2020-02-12 Thread Anchal Agarwal
, longer default timeout seems a bit more reasonable here to avoid hitting the timeout. Also, make it configurable via module parameter so that we can cover broader setups than what we know currently. [Anchal changelog: Variable name fix and checkpatch.pl fixes] Signed-off-by: Anchal Agarwal Signed

[Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-12 Thread Anchal Agarwal
) [ 36.855089] xen:grant_table: WARNING:e.g. 0x112 still in use! In this case, persistent grants would need to be disabled. [Anchal Changelog: Removed timeout/request during blkfront freeze. Fixed major part of the code to work with blk-mq] Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata

[Xen-devel] [RFC PATCH v3 09/12] x86/xen: save and restore steal clock

2020-02-12 Thread Anchal Agarwal
then. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- Changes since V2: * Separate patch to add save/restore call to suspend/resume code --- arch/x86/xen/suspend.c | 13 - arch/x86/xen/time.c| 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff

[Xen-devel] [RFC PATCH v3 07/12] genirq: Shutdown irq chips in suspend/resume during hibernation

2020-02-12 Thread Anchal Agarwal
e same event channel numbers are assigned to the devices when restoring the system. This may cause conflict like the following and prevent some devices from being restored correctly. Signed-off-by: Anchal Agarwal Suggested-by: Thomas Gleixner --- Changes since V2: * Its new patch to fix sh

[Xen-devel] [RFC PATCH v3 00/12] Enable PM hibernation on guest VMs

2020-02-12 Thread Anchal Agarwal
Besogonov (1): PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA Anchal Agarwal (4): x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume genirq: Shutdown irq chips in suspend/resume during hibernation xen: Introduce wrapper for save/restore sche

[Xen-devel] [RFC PATCH v3 01/12] xen/manage: keep track of the on-going suspend mode

2020-02-12 Thread Anchal Agarwal
the issue. [Anchal Changelog: Merged patch xen/manage: introduce helper function to know the on-going suspend mode into this one for better readability] Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata --- Changes since V2: None --- drivers/xen/manage.c | 73

[Xen-devel] [RFC PATCH v3 02/12] xenbus: add freeze/thaw/restore callbacks support

2020-02-12 Thread Anchal Agarwal
From: Munehisa Kamata Since commit b3e96c0c7562 ("xen: use freeze/restore/thaw PM events for suspend/resume/chkpt"), xenbus uses PMSG_FREEZE, PMSG_THAW and PMSG_RESTORE events for Xen suspend. However, they're actually assigned to xenbus_dev_suspend(), xenbus_dev_cancel() and xenbus_dev_resume()

[Xen-devel] [RFC PATCH v3 11/12] xen: Update sched clock offset to avoid system instability in hibernation

2020-02-12 Thread Anchal Agarwal
uler would then think that heavy CPU hog tasks need more time in CPU, causing the system to freeze Signed-off-by: Anchal Agarwal --- Changes Since V2: * New patch to update sched clock offset during hibernation to avoid hungups during resume when running a CPU intensive workload --- arch/x86/xen

[Xen-devel] [RFC PATCH v3 12/12] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA

2020-02-12 Thread Anchal Agarwal
the data is written out) in the validation of the swap signature in mark_swapfiles(). Before this patch, the command line processing was the only place where swsusp_resume_block was set. Signed-off-by: Aleksei Besogonov Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- Changes

[Xen-devel] [RFC PATCH v3 08/12] xen/time: introduce xen_{save, restore}_steal_clock

2020-02-12 Thread Anchal Agarwal
number. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- Changes since V2: * separated the previously merged patches * In V2, introduction of save/restore steal clock and usage in hibernation code was merged in a single patch --- drivers/xen/time.c| 29

[Xen-devel] [RFC PATCH v3 10/12] xen: Introduce wrapper for save/restore sched clock offset

2020-02-12 Thread Anchal Agarwal
Introduce wrappers for save/restore xen_sched_clock_offset to be used by PM hibernation code to avoid system instability during resume. Signed-off-by: Anchal Agarwal --- Changes since V2: * Dropped marking tsc unstable during hibernation patch * Fixed issue with xen_sched_clock_offset during

[Xen-devel] [RFC PATCH v3 05/12] xen-netfront: add callbacks for PM suspend and hibernation support

2020-02-14 Thread Anchal Agarwal
, longer default timeout seems a bit more reasonable here to avoid hitting the timeout. Also, make it configurable via module parameter so that we can cover broader setups than what we know currently. [Anchal changelog: Variable name fix and checkpatch.pl fixes] Signed-off-by: Anchal Agarwal Signed

[Xen-devel] [RFC PATCH v3 03/12] x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume

2020-02-14 Thread Anchal Agarwal
-by: Anchal Agarwal --- arch/x86/xen/enlighten_hvm.c | 7 +++ arch/x86/xen/xen-ops.h | 1 + 2 files changed, 8 insertions(+) diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c index e138f7de52d2..75b1ec7a0fcd 100644 --- a/arch/x86/xen/enlighten_hvm.c +++ b/arch/x86/xen

[Xen-devel] [RFC PATCH v3 02/12] xenbus: add freeze/thaw/restore callbacks support

2020-02-14 Thread Anchal Agarwal
From: Munehisa Kamata Since commit b3e96c0c7562 ("xen: use freeze/restore/thaw PM events for suspend/resume/chkpt"), xenbus uses PMSG_FREEZE, PMSG_THAW and PMSG_RESTORE events for Xen suspend. However, they're actually assigned to xenbus_dev_suspend(), xenbus_dev_cancel() and xenbus_dev_resume()

[Xen-devel] [RFC PATCH v3 07/12] genirq: Shutdown irq chips in suspend/resume during hibernation

2020-02-14 Thread Anchal Agarwal
e same event channel numbers are assigned to the devices when restoring the system. This may cause conflict like the following and prevent some devices from being restored correctly. Signed-off-by: Anchal Agarwal Suggested-by: Thomas Gleixner --- drivers/xen/events/events_base.c | 1 + include/linux

[Xen-devel] [RFC PATCH v3 11/12] xen: Update sched clock offset to avoid system instability in hibernation

2020-02-14 Thread Anchal Agarwal
uler would then think that heavy CPU hog tasks need more time in CPU, causing the system to freeze Signed-off-by: Anchal Agarwal --- arch/x86/xen/suspend.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c index dae0f74f5390..7e5275944

[Xen-devel] [RFC PATCH v3 12/12] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA

2020-02-14 Thread Anchal Agarwal
the data is written out) in the validation of the swap signature in mark_swapfiles(). Before this patch, the command line processing was the only place where swsusp_resume_block was set. Signed-off-by: Aleksei Besogonov Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- kernel

[Xen-devel] [RFC PATCH v3 04/12] x86/xen: add system core suspend and resume callbacks

2020-02-14 Thread Anchal Agarwal
From: Munehisa Kamata Add Xen PVHVM specific system core callbacks for PM suspend and hibernation support. The callbacks suspend and resume Xen primitives,like shared_info, pvclock and grant table. Note that Xen suspend can handle them in a different manner, but system core callbacks are called

[Xen-devel] [RFC PATCH v3 09/12] x86/xen: save and restore steal clock

2020-02-14 Thread Anchal Agarwal
then. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- arch/x86/xen/suspend.c | 13 - arch/x86/xen/time.c| 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c index 784c4484100b..dae0f74f5390

[Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-14 Thread Anchal Agarwal
From: Munehisa Kamata Signed-off-by: Munehisa Kamata --- drivers/block/xen-blkfront.c | 119 --- 1 file changed, 112 insertions(+), 7 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 478120233750..d715ed3cb69a 100644

[Xen-devel] [RFC PATCH v3 10/12] xen: Introduce wrapper for save/restore sched clock offset

2020-02-14 Thread Anchal Agarwal
Introduce wrappers for save/restore xen_sched_clock_offset to be used by PM hibernation code to avoid system instability during resume. Signed-off-by: Anchal Agarwal --- arch/x86/xen/time.c| 15 +-- arch/x86/xen/xen-ops.h | 2 ++ 2 files changed, 15 insertions(+), 2 deletions

[Xen-devel] [RFC PATCH v3 08/12] xen/time: introduce xen_{save, restore}_steal_clock

2020-02-14 Thread Anchal Agarwal
number. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- drivers/xen/time.c| 29 - include/xen/xen-ops.h | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/xen/time.c b/drivers/xen/time.c index 0968859c29d0..3560222cc0dd

Re: [Xen-devel] [RFC PATCH V2 09/11] xen: Clear IRQD_IRQ_STARTED flag during shutdown PIRQs

2020-01-10 Thread Anchal Agarwal
On Fri, Jan 10, 2020 at 08:13:16PM +0100, Thomas Gleixner wrote: > Anchal, > > Anchal Agarwal writes: > > On Thu, Jan 09, 2020 at 01:07:27PM +0100, Thomas Gleixner wrote: > >> Anchal Agarwal writes: > >> So either you can handle it purely on the XEN side wit

Re: [Xen-devel] [RFC PATCH V2 11/11] x86: tsc: avoid system instability in hibernation

2020-01-14 Thread Anchal Agarwal
On Tue, Jan 14, 2020 at 12:30:02AM +0100, Rafael J. Wysocki wrote: > On Mon, Jan 13, 2020 at 10:50 PM Rafael J. Wysocki wrote: > > > > On Mon, Jan 13, 2020 at 1:43 PM Peter Zijlstra wrote: > > > > > > On Mon, Jan 13, 2020 at 11:43:18AM +, Singh, Balbir wrote: > > > > For your original

Re: [Xen-devel] [RFC PATCH V2 11/11] x86: tsc: avoid system instability in hibernation

2020-01-22 Thread Anchal Agarwal
On Tue, Jan 14, 2020 at 07:29:52PM +, Anchal Agarwal wrote: > On Tue, Jan 14, 2020 at 12:30:02AM +0100, Rafael J. Wysocki wrote: > > On Mon, Jan 13, 2020 at 10:50 PM Rafael J. Wysocki > > wrote: > > > > > > On Mon, Jan 13, 2020 at 1:43 PM Peter Zijlstra &g

Re: [Xen-devel] [RFC PATCH V2 09/11] xen: Clear IRQD_IRQ_STARTED flag during shutdown PIRQs

2020-01-09 Thread Anchal Agarwal
On Thu, Jan 09, 2020 at 01:07:27PM +0100, Thomas Gleixner wrote: > Anchal Agarwal writes: > > On Wed, Jan 08, 2020 at 04:23:25PM +0100, Thomas Gleixner wrote: > >> Anchal Agarwal writes: > >> > +void irq_state_clr_started(struct irq_desc *desc) > >> &g

Re: [Xen-devel] [RFC PATCH V2 01/11] xen/manage: keep track of the on-going suspend mode

2020-01-09 Thread Anchal Agarwal
On Thu, Jan 09, 2020 at 06:49:07PM -0500, Boris Ostrovsky wrote: > > > On 1/9/20 6:46 PM, Boris Ostrovsky wrote: > > > > > >On 1/7/20 6:37 PM, Anchal Agarwal wrote: > >>+ > >>+static int xen_setup_pm_notifier(void) > >>+{ > >>+   

Re: [Xen-devel] [RFC PATCH V2 09/11] xen: Clear IRQD_IRQ_STARTED flag during shutdown PIRQs

2020-01-08 Thread Anchal Agarwal
On Wed, Jan 08, 2020 at 04:23:25PM +0100, Thomas Gleixner wrote: > Anchal Agarwal writes: > > > shutdown_pirq is invoked during hibernation path and hence > > PIRQs should be restarted during resume. > > Before this commit'020db9d3c1dc0a' xen/events: Fix interrupt los

[Xen-devel] [RFC PATCH V2 03/11] x86/xen: Introduce new function to map

2020-01-07 Thread Anchal Agarwal
-by: Anchal Agarwal --- arch/x86/xen/enlighten_hvm.c | 7 +++ arch/x86/xen/xen-ops.h | 1 + 2 files changed, 8 insertions(+) diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c index e138f7de52d2..75b1ec7a0fcd 100644 --- a/arch/x86/xen/enlighten_hvm.c +++ b/arch/x86/xen

[Xen-devel] [RFC PATCH V2 05/11] xen-netfront: add callbacks for PM suspend and hibernation support

2020-01-07 Thread Anchal Agarwal
, longer default timeout seems a bit more reasonable here to avoid hitting the timeout. Also, make it configurable via module parameter so that we can cover broader setups than what we know currently. [Anchal changelog: Variable name fix and checkpatch.pl fixes] Signed-off-by: Anchal Agarwal Signed

[Xen-devel] [RFC PATCH V2 04/11] x86/xen: add system core suspend and resume callbacks

2020-01-07 Thread Anchal Agarwal
From: Munehisa Kamata Add Xen PVHVM specific system core callbacks for PM suspend and hibernation support. The callbacks suspend and resume Xen primitives,like shared_info, pvclock and grant table. Note that Xen suspend can handle them in a different manner, but system core callbacks are called

[Xen-devel] [RFC PATCH V2 06/11] xen-blkfront: add callbacks for PM suspend and hibernation

2020-01-07 Thread Anchal Agarwal
) [ 36.855089] xen:grant_table: WARNING:e.g. 0x112 still in use! In this case, persistent grants would need to be disabled. [Anchal Changelog: Removed timeout/request during blkfront freeze. Fixed major part of the code to work with blk-mq] Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata

[Xen-devel] [RFC PATCH V2 08/11] x86/xen: close event channels for PIRQs in system core suspend callback

2020-01-07 Thread Anchal Agarwal
ume callback. Re-allocation will occur when PM core re-enable IRQs for the devices at later point. Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- arch/x86/xen/suspend.c | 2 ++ drivers/xen/events/events_base.c | 12 include/xen/events.h | 1 + 3 f

[Xen-devel] [RFC PATCH V2 09/11] xen: Clear IRQD_IRQ_STARTED flag during shutdown PIRQs

2020-01-07 Thread Anchal Agarwal
uring resume instead and pirq's never start up. Signed-off-by: Anchal Agarwal --- drivers/xen/events/events_base.c | 1 + include/linux/irq.h | 1 + kernel/irq/chip.c| 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/xen/events/events_base

[Xen-devel] [RFC PATCH V2 07/11] x86/xen: save and restore steal clock during hibernation

2020-01-07 Thread Anchal Agarwal
/time: introduce xen_{save,restore}_steal_clock with this one for better code readability] Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata --- arch/x86/xen/suspend.c | 13 - arch/x86/xen/time.c| 3 +++ drivers/xen/time.c | 28 +++- include

[Xen-devel] [RFC PATCH V2 02/11] xenbus: add freeze/thaw/restore callbacks support

2020-01-07 Thread Anchal Agarwal
From: Munehisa Kamata Since commit b3e96c0c7562 ("xen: use freeze/restore/thaw PM events for suspend/resume/chkpt"), xenbus uses PMSG_FREEZE, PMSG_THAW and PMSG_RESTORE events for Xen suspend. However, they're actually assigned to xenbus_dev_suspend(), xenbus_dev_cancel() and xenbus_dev_resume()

[Xen-devel] [RFC PATCH V2 00/11] Enable PM hibernation on guest VMs

2020-01-07 Thread Anchal Agarwal
et = fcntl.ioctl(f.fileno(), 0x01, buf) print buf[0] " Aleksei Besogonov (1): PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA Anchal Agarwal (2): x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume xen: Clear IRQD_IRQ_STARTED flag during shutd

[Xen-devel] [RFC PATCH V2 01/11] xen/manage: keep track of the on-going suspend mode

2020-01-07 Thread Anchal Agarwal
the issue. [Anchal Changelog: Merged patch xen/manage: introduce helper function to know the on-going suspend mode into this one for better readability] Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata --- drivers/xen/manage.c | 73

[Xen-devel] [RFC PATCH V2 10/11] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA

2020-01-07 Thread Anchal Agarwal
the data is written out) in the validation of the swap signature in mark_swapfiles(). Before this patch, the command line processing was the only place where swsusp_resume_block was set. Signed-off-by: Aleksei Besogonov Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- kernel

[Xen-devel] [RFC PATCH V2 11/11] x86: tsc: avoid system instability in hibernation

2020-01-07 Thread Anchal Agarwal
wed-by: Munehisa Kamata Tested-by: Anchal Agarwal Signed-off-by: Eduardo Valentin --- arch/x86/kernel/tsc.c | 29 + include/linux/sched/clock.h | 5 + kernel/sched/clock.c| 4 ++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/arch/

Re: [Xen-devel] [EXTERNAL][RFC PATCH v3 07/12] genirq: Shutdown irq chips in suspend/resume during hibernation

2020-03-09 Thread Anchal Agarwal
On Sat, Mar 07, 2020 at 12:03:52AM +0100, Thomas Gleixner wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > Anchal Agarwal writes: &

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-03-06 Thread Anchal Agarwal
On Fri, Feb 21, 2020 at 03:24:45PM +0100, Roger Pau Monné wrote: > On Fri, Feb 14, 2020 at 11:25:34PM +0000, Anchal Agarwal wrote: > > From: Munehisa Kamata > > > Add freeze, thaw and restore callbacks for PM suspend and hibernation > > support. All frontend d

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-03-13 Thread Anchal Agarwal
ee my response inline. > > > > On Fri, Mar 06, 2020 at 06:40:33PM +, Anchal Agarwal wrote: > > > On Fri, Feb 21, 2020 at 03:24:45PM +0100, Roger Pau Monné wrote: > > > > On Fri, Feb 14, 2020 at 11:25:34PM +, Anchal Agarwal

[PATCH 04/12] x86/xen: add system core suspend and resume callbacks

2020-05-19 Thread Anchal Agarwal
From: Munehisa Kamata Add Xen PVHVM specific system core callbacks for PM suspend and hibernation support. The callbacks suspend and resume Xen primitives,like shared_info, pvclock and grant table. Note that Xen suspend can handle them in a different manner, but system core callbacks are called

[PATCH 01/12] xen/manage: keep track of the on-going suspend mode

2020-05-19 Thread Anchal Agarwal
the issue. [Anchal Changelog: Code refactoring] Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata --- drivers/xen/manage.c | 73 +++ include/xen/xen-ops.h | 3 ++ 2 files changed, 76 insertions(+) diff --git a/drivers/xen/manage.c b/drivers/xen

[PATCH 05/12] genirq: Shutdown irq chips in suspend/resume during hibernation

2020-05-19 Thread Anchal Agarwal
interrupts connected to it are handled this way. This is pretty much in line with the other interrupt chip specific quirks, e.g. IRQCHIP_MASK_ON_SUSPEND. Add a new quirk flag IRQCHIP_SHUTDOWN_ON_SUSPEND and add support for it the core interrupt suspend/resume paths. Signed-off-by: Anchal Agarwal Signed

[PATCH 07/12] xen-netfront: add callbacks for PM suspend and hibernation

2020-05-19 Thread Anchal Agarwal
, longer default timeout seems a bit more reasonable here to avoid hitting the timeout. Also, make it configurable via module parameter so that we can cover broader setups than what we know currently. [Anchal changelog: Variable name fix and checkpatch.pl fixes] Signed-off-by: Anchal Agarwal Signed

[PATCH 12/12] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA

2020-05-19 Thread Anchal Agarwal
Besogonov Signed-off-by: Munehisa Kamata Signed-off-by: Anchal Agarwal --- kernel/power/user.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/power/user.c b/kernel/power/user.c index 7959449765d9..1afa1f0a223e 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c

[PATCH 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-05-21 Thread Anchal Agarwal
/request during blkfront freeze. Reworked the whole patch to work with blk-mq and incorporate upstream's comments] Fixes: Build errors reported by kbuild due to linebreak Reported-by: kbuild test robot Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata --- drivers/block/xen-blkfront.c

Re: [PATCH v3 00/11] Fix PM hibernation in Xen guests

2020-09-11 Thread Anchal Agarwal
On Fri, Aug 28, 2020 at 06:39:45PM +, Anchal Agarwal wrote: > On Fri, Aug 28, 2020 at 08:29:24PM +0200, Rafael J. Wysocki wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the

Re: [PATCH v3 02/11] xenbus: add freeze/thaw/restore callbacks support

2020-09-15 Thread Anchal Agarwal
On Sun, Sep 13, 2020 at 12:11:47PM -0400, boris.ostrov...@oracle.com wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 8/21/20 6:

Re: [PATCH v3 05/11] genirq: Shutdown irq chips in suspend/resume during hibernation

2020-08-24 Thread Anchal Agarwal
rt below the --- seperator next > time because that's really not part of the final commit messaage and the > maintainer has then to strip it off manually > Ack. > > Signed-off-by: Anchal Agarwal > > Signed-off-by: Thomas Gleixner > > These SOB lines are just wrongly

Re: [PATCH v3 01/11] xen/manage: keep track of the on-going suspend mode

2020-09-25 Thread Anchal Agarwal
On Tue, Sep 22, 2020 at 11:17:36PM +, Anchal Agarwal wrote: > On Tue, Sep 22, 2020 at 12:18:05PM -0400, boris.ostrov...@oracle.com wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the

Re: [PATCH v2 01/11] xen/manage: keep track of the on-going suspend mode

2020-07-21 Thread Anchal Agarwal
you in case you could be able to give this a try and > make sure it doesn't break suspend for dom0. > > On Tue, Jul 21, 2020 at 12:17:36AM +, Anchal Agarwal wrote: > > On Mon, Jul 20, 2020 at 11:37:05AM +0200, Roger Pau Monné wrote: > > > CAUTION: This email originated from out

[PATCH v2 02/11] xenbus: add freeze/thaw/restore callbacks support

2020-07-02 Thread Anchal Agarwal
ven for PM suspend whereas suspend/resume callbacks are normally used in the case, becausae the existing xenbus device drivers already have suspend/resume callbacks specifically designed for Xen suspend. So we can allow the device drivers to keep the existing callbacks wihtout modification. [Anch

[PATCH v2 10/11] xen: Update sched clock offset to avoid system instability in hibernation

2020-07-02 Thread Anchal Agarwal
uler would then think that heavy CPU hog tasks need more time in CPU, causing the system to freeze Signed-off-by: Anchal Agarwal --- arch/x86/xen/suspend.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c index 10cd14326472..4d8b1d239

[PATCH v2 07/11] xen-netfront: add callbacks for PM suspend and hibernation

2020-07-02 Thread Anchal Agarwal
, longer default timeout seems a bit more reasonable here to avoid hitting the timeout. Also, make it configurable via module parameter so that we can cover broader setups than what we know currently. [Anchal Agarwal: Changelog]: RFCv1->RFCv2: Variable name fix and checkpatch.pl fixes] Signed-

[PATCH v2 06/11] xen-blkfront: add callbacks for PM suspend and hibernation

2020-07-02 Thread Anchal Agarwal
, the frontend may see massive amount of grant table warning when freeing resources. [ 36.852659] deferring g.e. 0xf9 (pfn 0x) [ 36.855089] xen:grant_table: WARNING:e.g. 0x112 still in use! In this case, persistent grants would need to be disabled. [Anchal Agarwal: Changelog]: RFC v1

[PATCH v2 09/11] xen: Introduce wrapper for save/restore sched clock offset

2020-07-02 Thread Anchal Agarwal
Introduce wrappers for save/restore xen_sched_clock_offset to be used by PM hibernation code to avoid system instability during resume. Signed-off-by: Anchal Agarwal --- arch/x86/xen/time.c| 15 +-- arch/x86/xen/xen-ops.h | 2 ++ 2 files changed, 15 insertions(+), 2 deletions

[PATCH v2 08/11] x86/xen: save and restore steal clock during PM hibernation

2020-07-02 Thread Anchal Agarwal
clock offset and using existing ones that are used during LM Signed-off-by: Anchal Agarwal --- arch/x86/xen/suspend.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c index e8c924e93fc5..10cd14326472 100644 --- a/arch/x86/

[PATCH v2 01/11] xen/manage: keep track of the on-going suspend mode

2020-07-02 Thread Anchal Agarwal
the issue. [Anchal Agarwal: Changelog]: RFC v1->v2: Code refactoring v1->v2: Remove unused functions for PM SUSPEND/PM hibernation Signed-off-by: Anchal Agarwal Signed-off-by: Munehisa Kamata --- drivers/xen/manage.c | 60 +++ include/xen/xen-ops.

[PATCH v2 00/11] Fix PM hibernation in Xen guests

2020-07-02 Thread Anchal Agarwal
le f = open(sys.argv[1], 'r') buf = array.array('L', [0]) #FIBMAP ret = fcntl.ioctl(f.fileno(), 0x01, buf) print buf[0] " Aleksei Besogonov (1): PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA Anchal Agarwal (4): x86/xen: Introduce new function to map HYPERVISOR_shar

[PATCH v2 03/11] x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume

2020-07-02 Thread Anchal Agarwal
;v2: Remove extra check for shared_info_pfn to be NULL Signed-off-by: Anchal Agarwal --- arch/x86/xen/enlighten_hvm.c | 6 ++ arch/x86/xen/xen-ops.h | 1 + 2 files changed, 7 insertions(+) diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c index 3e89b0067

Re: [PATCH 03/12] x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume

2020-06-08 Thread Anchal Agarwal
On Fri, Jun 05, 2020 at 05:39:54PM -0400, Boris Ostrovsky wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 6/4/20 7:03 PM,

Re: [PATCH v2 01/11] xen/manage: keep track of the on-going suspend mode

2020-07-22 Thread Anchal Agarwal
On Tue, Jul 21, 2020 at 05:18:34PM -0700, Stefano Stabellini wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On Tue, 21 Jul 2020, Boris Ostrovsky wrote:

Re: [PATCH v3 01/11] xen/manage: keep track of the on-going suspend mode

2021-05-20 Thread Anchal Agarwal
On Thu, Oct 01, 2020 at 08:43:58AM -0400, boris.ostrov...@oracle.com wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > >>> Also, wrt KASLR stuff, that

Re: [PATCH v3 01/11] xen/manage: keep track of the on-going suspend mode

2021-05-25 Thread Anchal Agarwal
On Tue, May 25, 2021 at 06:23:35PM -0400, Boris Ostrovsky wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 5/21/21 1:26 AM,

Re: [PATCH v3 01/11] xen/manage: keep track of the on-going suspend mode

2021-05-28 Thread Anchal Agarwal
On Wed, May 26, 2021 at 02:29:53PM -0400, Boris Ostrovsky wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 5/26/21 12:40 AM,

Re: [PATCH v3 01/11] xen/manage: keep track of the on-going suspend mode

2021-06-02 Thread Anchal Agarwal
On Tue, Jun 01, 2021 at 10:18:36AM -0400, Boris Ostrovsky wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 5/28/21 5:50 PM,

Re: [PATCH v3 01/11] xen/manage: keep track of the on-going suspend mode

2021-06-03 Thread Anchal Agarwal
On Thu, Jun 03, 2021 at 04:11:46PM -0400, Boris Ostrovsky wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 6/2/21 3:37 PM,