On 2/5/26 12:33 PM, Jan Beulich wrote:
The barrier in vcpu_context_saved() is specifically about the clearing of
->is_running. It isn't needed when we don't clear the flag.
Furthermore, one side of the barrier being in common code, the other would
better be, too. This way, all architectures are covered (beyond any
specific needs they may have).
Don't we want then move ...
Signed-off-by: Jan Beulich <[email protected]>
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -333,17 +333,7 @@ void sync_local_execstate(void)
void sync_vcpu_execstate(struct vcpu *v)
{
- /*
- * We don't support lazy switching.
- *
- * However the context may have been saved from a remote pCPU so we
- * need a barrier to ensure it is observed before continuing.
- *
- * Per vcpu_context_saved(), the context can be observed when
- * v->is_running is false (the caller should check it before calling
- * this function).
- */
- smp_rmb();
+ /* Nothing to do -- no lazy switching */
}
... to common code with ability to re-define sync_vcpu_execstate() by arch
as only x86 does something inside this function?
~ Oleksii