[Xen-devel] [PATCH v4 0/2] kexec: Use hypercall_create_continuation to protect KEXEC ops

2017-04-19 Thread Eric DeVolder
#print "Ending unload thread $thr_id\n"; threads->detach(); #End thread. }); } for my $i (0..99) { threaded_task(); } Eric DeVolder (2): kexec: use hypercall_create_continuation to protect KEXEC ops kexec: remove spinlock now that all KEXEC hypercall ops

[Xen-devel] [PATCH v4 1/2] kexec: use hypercall_create_continuation to protect KEXEC ops

2017-04-19 Thread Eric DeVolder
e crash path. The overloading would lead to failures in existing checks on this flag as the flag would always be set at the top level in do_kexec_op_internal(). For this reason, the new flag KEXEC_FLAG_HC_IN_PROGRESS was introduced. While at it, fixed the #define mismatched spacing Signed-off-by: E

[Xen-devel] [PATCH v4 2/2] kexec: remove spinlock now that all KEXEC hypercall ops are protected at the top-level

2017-04-19 Thread Eric DeVolder
in place of the spin_lock(). Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> Reviewed-by: Bhavesh Davda <bhavesh.da...@oracle.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> --- v4: 04/19/2017 - Fix ASSERT to work properly. Tested with Config.mk:debug

Re: [Xen-devel] [PATCH v3 2/2] kexec: remove spinlock now that all KEXEC hypercall ops are protected at the top-level

2017-04-19 Thread Eric DeVolder
On 04/19/2017 11:21 AM, Jan Beulich wrote: On 19.04.17 at 17:47, wrote: @@ -832,7 +831,7 @@ static int kexec_swap_images(int type, struct kexec_image *new, if ( kexec_load_get_bits(type, , ) ) return -EINVAL; -spin_lock(_lock); +ASSERT(

Re: [Xen-devel] [PATCH v3 2/2] kexec: remove spinlock now that all KEXEC hypercall ops are protected at the top-level

2017-04-19 Thread Eric DeVolder
On 04/19/2017 10:47 AM, Eric DeVolder wrote: The spinlock in kexec_swap_images() was removed as this function is only reachable on the kexec hypercall, which is now protected at the top-level in do_kexec_op_internal(), thus the local spinlock is no longer necessary. Per recommendation from Jan

Re: [Xen-devel] [PATCH v2 1/2] kexec: use hypercall_create_continuation to protect KEXEC ops

2017-04-19 Thread Eric DeVolder
On 04/19/2017 06:48 AM, Andrew Cooper wrote: On 19/04/17 12:00, Daniel Kiper wrote: On Tue, Apr 18, 2017 at 04:48:06AM -0600, Jan Beulich wrote: On 17.04.17 at 21:09, wrote: --- a/xen/common/kexec.c +++ b/xen/common/kexec.c @@ -50,9 +50,10 @@ static cpumask_t

Re: [Xen-devel] [PATCH v2 2/2] kexec: remove spinlock now that all KEXEC hypercall ops are protected at the top-level

2017-04-19 Thread Eric DeVolder
On 04/19/2017 08:37 AM, Jan Beulich wrote: On 19.04.17 at 14:13, wrote: On Wed, Apr 19, 2017 at 05:20:50AM -0600, Jan Beulich wrote: On 19.04.17 at 12:56, wrote: On Tue, Apr 18, 2017 at 04:49:48AM -0600, Jan Beulich wrote: On 17.04.17 at

[Xen-devel] [PATCH v3 0/2] kexec: Use hypercall_create_continuation to protect KEXEC ops

2017-04-19 Thread Eric DeVolder
#print "Ending unload thread $thr_id\n"; threads->detach(); #End thread. }); } for my $i (0..99) { threaded_task(); } Eric DeVolder (2): kexec: use hypercall_create_continuation to protect KEXEC ops kexec: remove spinlock now that all KEXEC hypercall ops

[Xen-devel] [PATCH v3 1/2] kexec: use hypercall_create_continuation to protect KEXEC ops

2017-04-19 Thread Eric DeVolder
e crash path. The overloading would lead to failures in existing checks on this flag as the flag would always be set at the top level in do_kexec_op_internal(). For this reason, the new flag KEXEC_FLAG_HC_IN_PROGRESS was introduced. While at it, fixed the #define mismatched spacing Signed-off-by: E

[Xen-devel] [PATCH v3 2/2] kexec: remove spinlock now that all KEXEC hypercall ops are protected at the top-level

2017-04-19 Thread Eric DeVolder
in place of the spin_lock(). Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> Reviewed-by: Bhavesh Davda <bhavesh.da...@oracle.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> --- v3: - Incorporated feedback from Jan Beulich and Andrew Cooper to lea

[Xen-devel] [PATCH v2 2/2] kexec: remove spinlock now that all KEXEC hypercall ops are protected at the top-level

2017-04-17 Thread Eric DeVolder
The spinlock in kexec_swap_images() was removed as this function is only reachable on the kexec hypercall, which is now protected at the top-level in do_kexec_op_internal(), thus the local spinlock is no longer necessary. Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> Re

[Xen-devel] [PATCH v2 0/2] kexec: Use hypercall_create_continuation to protect KEXEC ops

2017-04-17 Thread Eric DeVolder
#print "Ending unload thread $thr_id\n"; threads->detach(); #End thread. }); } for my $i (0..99) { threaded_task(); } Eric DeVolder (2): kexec: use hypercall_create_continuation to protect KEXEC ops kexec: remove spinlock now that all KEXEC hypercall ops

[Xen-devel] [PATCH v2 1/2] kexec: use hypercall_create_continuation to protect KEXEC ops

2017-04-17 Thread Eric DeVolder
e crash path. The overloading would lead to failures in existing checks on this flag as the flag would always be set at the top level in do_kexec_op_internal(). For this reason, the new flag KEXEC_FLAG_HC_IN_PROGRESS was introduced. While at it, fixed the #define mismatched spacing Signed-off-by: E

[Xen-devel] [PATCH] kexec: Add spinlock for the whole hypercall

2017-04-10 Thread Eric DeVolder
) to prevent crashes during simultaneous load/unloads. Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com> --- xen/common/kexec.c | 17 - 1 fil

[Xen-devel] [PATCH v4] kexec: implemented XEN KEXEC STATUS to determine if an image is loaded

2017-01-25 Thread Eric DeVolder
-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- CC: ke...@lists.infradead.org CC: xen-de...@lists.xenproject.org CC: Daniel Kiper <daniel.ki...@oracle.com> v0: First version (internal product). v1: Posted on kexec mailin

Re: [Xen-devel] [PATCH v3] kexec: implemented XEN KEXEC STATUS to determine if an image is loaded

2017-01-24 Thread Eric DeVolder
On 01/24/2017 01:16 PM, Daniel Kiper wrote: On Tue, Jan 24, 2017 at 12:55:35PM -0600, Eric DeVolder wrote: Instead of the scripts having to poke at various fields we can provide that functionality via the -S parameter. kexec_loaded/kexec_crash_loaded exposes Linux kernel kexec/crash state

Re: [Xen-devel] [PATCH v3] kexec: implemented XEN KEXEC STATUS to determine if an image is loaded

2017-01-24 Thread Eric DeVolder
On 01/24/2017 01:16 PM, Daniel Kiper wrote: On Tue, Jan 24, 2017 at 12:55:35PM -0600, Eric DeVolder wrote: Instead of the scripts having to poke at various fields we can provide that functionality via the -S parameter. kexec_loaded/kexec_crash_loaded exposes Linux kernel kexec/crash state

[Xen-devel] [PATCH v3] kexec: implemented XEN KEXEC STATUS to determine if an image is loaded

2017-01-24 Thread Eric DeVolder
-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- Note: The corresponding Xen changes have been committed to the Xen staging branch. Follow this thread: https://lists.xenproject.org/archives/html/xen-devel/2017-01/msg01570.html

[Xen-devel] [PATCH v2] kexec: implemented XEN KEXEC STATUS to determine if an image is loaded

2017-01-20 Thread Eric DeVolder
com> Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- Note: The corresponding Xen changes have been committed to the Xen staging branch. Follow this thread: https://lists.xenproject.org/archives/html/xen-devel/2017-01/msg01570.html CC: Andrew Cooper <andrew.coop...@cit

[Xen-devel] [PATCH 1/1] kexec: ensure kexec_status() return bit value of 0 or 1

2017-01-19 Thread Eric DeVolder
When checking kexec_flags bit corresponding to the requested image, ensure that 0 or 1 is returned. Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- xen/common/kexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/common/kexec.c b/xen/common/kexec.c

[Xen-devel] [PATCH 0/1] Followup corrections for kexec_status()

2017-01-19 Thread Eric DeVolder
Jan, This corrects the use of test_bit() in kexec_status(). Wei, This patch is against the kexec_status() recently applied to staging. Regards, Eric ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH 1/2] Put back blank line for readability purposes.

2017-01-18 Thread Eric DeVolder
This blank line was accidentally removed during the insertion of the kexec_status() declarations. Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- xen/include/public/kexec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/include/public/kexec.h b/xen/include/public/k

[Xen-devel] [PATCH 2/2] kexec: ensure kexec_status() always returns 0 or 1

2017-01-18 Thread Eric DeVolder
The use of test_bit() can also return EPERM, so the return value from test_bit() must be checked to ensure that kexec_status() always returns 0, 1 or -1, per the public header description. Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- xen/common/kexec.c | 2 +- 1 file chan

[Xen-devel] [PATCH] kexec: followup to STATUS patch v3 already in staging

2017-01-18 Thread Eric DeVolder
This contains the two corrections pointed out by Jan Beulich for the kexec STATUS call just introduced. Note: In kexec_status(), the use of test_bit() can also return EPERM, so the return value from test_bit() must be checked to ensure that kexec_status() always returns 0, 1 or -1, per the public

Re: [Xen-devel] [PATCH v4] kexec: implement STATUS hypercall to check if image is loaded

2017-01-18 Thread Eric DeVolder
On 01/18/2017 11:47 AM, Wei Liu wrote: On Wed, Jan 18, 2017 at 11:46:13AM -0600, Eric DeVolder wrote: The tools that use kexec are asynchronous in nature and do not keep state changes. As such provide an hypercall to find out whether an image has been loaded for either type. Note: No need

[Xen-devel] [PATCH] Put back blank line for readability purposes.

2017-01-18 Thread Eric DeVolder
This blank line was accidentally removed during the insertion of the kexec_status() declarations. --- xen/include/public/kexec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/include/public/kexec.h b/xen/include/public/kexec.h index c200e8c..74ea981 100644 ---

[Xen-devel] [PATCH] kexec: ensure kexec_status() always returns 0 or 1

2017-01-18 Thread Eric DeVolder
The use of test_bit() can also return EPERM, so the return value from test_bit() must be checked to ensure that kexec_status() always returns 0, 1 or -1, per the public header description. --- xen/common/kexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Xen-devel] Followup corrections to kexec STATUS patch v3

2017-01-18 Thread Eric DeVolder
This contains the two corrections pointed out by Jan Beulich for the kexec STATUS call just introduced. Note: In kexec_status(), the use of test_bit() can also return EPERM, so the return value from test_bit() must be checked to ensure that kexec_status() always returns 0, 1 or -1, per the public

Re: [Xen-devel] [PATCH v3] kexec: implement STATUS hypercall to check if image is loaded

2017-01-18 Thread Eric DeVolder
On 01/18/2017 04:47 AM, Wei Liu wrote: On Wed, Jan 18, 2017 at 03:45:54AM -0700, Jan Beulich wrote: On 18.01.17 at 11:37, wrote: On Wed, Jan 18, 2017 at 03:19:49AM -0700, Jan Beulich wrote: On 17.01.17 at 18:29, wrote: --- a/xen/common/kexec.c

[Xen-devel] [PATCH v4] kexec: implement STATUS hypercall to check if image is loaded

2017-01-18 Thread Eric DeVolder
or -1, per the public header description. Note: This is just the Xen side of the hypercall, kexec-tools patch to come separately. Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- CC: Andrew Cooper <andrew.coo

[Xen-devel] [PATCH v3] kexec: implement STATUS hypercall to check if image is loaded

2017-01-17 Thread Eric DeVolder
KEXEC_FLAG_IN_PROGRESS (and error out of kexec_status()) as this flag is set only once by the first/only cpu on the crash path. Note: This is just the Xen side of the hypercall, kexec-tools patch to come separately. Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Signed-off-by

[Xen-devel] [PATCH v2] kexec: implement STATUS hypercall to check if image is loaded

2017-01-12 Thread Eric DeVolder
, kexec-tools patch to come separately. Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com> --- CC: Elena Ufimtseva <elena.ufimts...@oracle.com> CC:

[Xen-devel] [PATCH] convert tabs into spaces; preserving indentation

2017-01-09 Thread Eric DeVolder
Convert tabs into spaces; preserving indentation No functional changes Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- tools/libxc/xc_kexec.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/libxc/xc_kexec.c b/tools/libxc/xc_kexec.c

[Xen-devel] [replace tabs with spaces] convert tabs into spaces; preserving indentation

2017-01-09 Thread Eric DeVolder
Convert tabs into spaces; preserving indentation No functional changes Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- tools/libxc/xc_kexec.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/libxc/xc_kexec.c b/tools/libxc/xc_kexec.c

[Xen-devel] [XEN KEXEC PATCH] Corrected comment typo "count not" to "could not"

2016-12-21 Thread Eric DeVolder
Fix cut-n-paste typo; changed the words "count not" to "could not". No functional changes Signed-off-by: Eric DeVolder <eric.devol...@oracle.com> --- tools/libxc/xc_kexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxc/xc_kexec.