* [PATCH] xen:arm: we never get into schedule_tail() with prev==current
@ 2019-05-08 9:59 ` Andrii Anisov
0 siblings, 0 replies; 6+ messages in thread
From: Andrii Anisov @ 2019-05-08 9:59 UTC (permalink / raw)
To: xen-devel
Cc: xen-devel, Julien Grall, Stefano Stabellini, Andrii Anisov,
Dario Faggioli
From: Andrii Anisov <andrii_anisov@epam.com>
ARM's schedule_tail() is called from two places: context_switch() and
continue_new_vcpu(). Both functions are always called with
prev!=current. So replace the correspondent check in schedule_tail()
with ASSERT() which is the development (debug) build guard.
Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---
xen/arch/arm/domain.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 6dc633e..721d40e 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -305,6 +305,8 @@ static void update_runstate_area(struct vcpu *v)
static void schedule_tail(struct vcpu *prev)
{
+ ASSERT(prev != current);
+
ctxt_switch_from(prev);
ctxt_switch_to(current);
@@ -313,8 +315,7 @@ static void schedule_tail(struct vcpu *prev)
context_saved(prev);
- if ( prev != current )
- update_runstate_area(current);
+ update_runstate_area(current);
/* Ensure that the vcpu has an up-to-date time base. */
update_vcpu_system_time(current);
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Xen-devel] [PATCH] xen:arm: we never get into schedule_tail() with prev==current
@ 2019-05-08 9:59 ` Andrii Anisov
0 siblings, 0 replies; 6+ messages in thread
From: Andrii Anisov @ 2019-05-08 9:59 UTC (permalink / raw)
To: xen-devel
Cc: xen-devel, Julien Grall, Stefano Stabellini, Andrii Anisov,
Dario Faggioli
From: Andrii Anisov <andrii_anisov@epam.com>
ARM's schedule_tail() is called from two places: context_switch() and
continue_new_vcpu(). Both functions are always called with
prev!=current. So replace the correspondent check in schedule_tail()
with ASSERT() which is the development (debug) build guard.
Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---
xen/arch/arm/domain.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 6dc633e..721d40e 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -305,6 +305,8 @@ static void update_runstate_area(struct vcpu *v)
static void schedule_tail(struct vcpu *prev)
{
+ ASSERT(prev != current);
+
ctxt_switch_from(prev);
ctxt_switch_to(current);
@@ -313,8 +315,7 @@ static void schedule_tail(struct vcpu *prev)
context_saved(prev);
- if ( prev != current )
- update_runstate_area(current);
+ update_runstate_area(current);
/* Ensure that the vcpu has an up-to-date time base. */
update_vcpu_system_time(current);
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] xen:arm: we never get into schedule_tail() with prev==current
@ 2019-05-08 11:25 ` Dario Faggioli
0 siblings, 0 replies; 6+ messages in thread
From: Dario Faggioli @ 2019-05-08 11:25 UTC (permalink / raw)
To: Andrii Anisov, xen-devel
Cc: xen-devel, Julien Grall, Stefano Stabellini, Andrii Anisov
[-- Attachment #1.1: Type: text/plain, Size: 796 bytes --]
On Wed, 2019-05-08 at 12:59 +0300, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_anisov@epam.com>
>
> ARM's schedule_tail() is called from two places: context_switch() and
> continue_new_vcpu(). Both functions are always called with
> prev!=current. So replace the correspondent check in schedule_tail()
> with ASSERT() which is the development (debug) build guard.
>
> Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
>
FWIW,
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
Thanks and Regards
--
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xen-devel] [PATCH] xen:arm: we never get into schedule_tail() with prev==current
@ 2019-05-08 11:25 ` Dario Faggioli
0 siblings, 0 replies; 6+ messages in thread
From: Dario Faggioli @ 2019-05-08 11:25 UTC (permalink / raw)
To: Andrii Anisov, xen-devel
Cc: xen-devel, Julien Grall, Stefano Stabellini, Andrii Anisov
[-- Attachment #1.1: Type: text/plain, Size: 796 bytes --]
On Wed, 2019-05-08 at 12:59 +0300, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_anisov@epam.com>
>
> ARM's schedule_tail() is called from two places: context_switch() and
> continue_new_vcpu(). Both functions are always called with
> prev!=current. So replace the correspondent check in schedule_tail()
> with ASSERT() which is the development (debug) build guard.
>
> Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
>
FWIW,
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
Thanks and Regards
--
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen:arm: we never get into schedule_tail() with prev==current
@ 2019-05-16 15:48 ` Julien Grall
0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2019-05-16 15:48 UTC (permalink / raw)
To: Dario Faggioli, Andrii Anisov, xen-devel
Cc: xen-devel, Stefano Stabellini, Andrii Anisov
Hi,
On 08/05/2019 12:25, Dario Faggioli wrote:
> On Wed, 2019-05-08 at 12:59 +0300, Andrii Anisov wrote:
>> From: Andrii Anisov <andrii_anisov@epam.com>
>>
>> ARM's schedule_tail() is called from two places: context_switch() and
>> continue_new_vcpu(). Both functions are always called with
>> prev!=current. So replace the correspondent check in schedule_tail()
>> with ASSERT() which is the development (debug) build guard.
>>
>> Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
>>
> FWIW,
>
> Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
I have now committed the patch.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xen-devel] [PATCH] xen:arm: we never get into schedule_tail() with prev==current
@ 2019-05-16 15:48 ` Julien Grall
0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2019-05-16 15:48 UTC (permalink / raw)
To: Dario Faggioli, Andrii Anisov, xen-devel
Cc: xen-devel, Stefano Stabellini, Andrii Anisov
Hi,
On 08/05/2019 12:25, Dario Faggioli wrote:
> On Wed, 2019-05-08 at 12:59 +0300, Andrii Anisov wrote:
>> From: Andrii Anisov <andrii_anisov@epam.com>
>>
>> ARM's schedule_tail() is called from two places: context_switch() and
>> continue_new_vcpu(). Both functions are always called with
>> prev!=current. So replace the correspondent check in schedule_tail()
>> with ASSERT() which is the development (debug) build guard.
>>
>> Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
>>
> FWIW,
>
> Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
I have now committed the patch.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-05-16 15:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 9:59 [PATCH] xen:arm: we never get into schedule_tail() with prev==current Andrii Anisov
2019-05-08 9:59 ` [Xen-devel] " Andrii Anisov
2019-05-08 11:25 ` Dario Faggioli
2019-05-08 11:25 ` [Xen-devel] " Dario Faggioli
2019-05-16 15:48 ` Julien Grall
2019-05-16 15:48 ` [Xen-devel] " Julien Grall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.