[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] Arm: relax barrier in sync_vcpu_execstate()



commit 3d11d55e19b749697ea7c3799c264b83f5a57a80
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Feb 5 10:29:53 2026 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Feb 5 10:29:53 2026 +0100

    Arm: relax barrier in sync_vcpu_execstate()
    
    The counterpart in vcpu_context_saved() is smp_wmb(), and here we don't
    really need any more than a read barrier: The concern expressed in the
    comment is void, as updates to the context are necessarily observed ahead
    of ->is_running going false, by virtue of said barrier in
    vcpu_context_saved().
    
    Amends: f6790389613c ("xen/arm: sched: Ensure the vCPU context is seen 
before vcpu_pause() returns")
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Julien Grall <julien@xxxxxxx>
---
 xen/arch/arm/domain.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 507df807ed..2eca2b913d 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -342,11 +342,8 @@ void sync_vcpu_execstate(struct vcpu *v)
      * Per vcpu_context_saved(), the context can be observed when
      * v->is_running is false (the caller should check it before calling
      * this function).
-     *
-     * Note this is a full barrier to also prevent update of the context
-     * to happen before it was observed.
      */
-    smp_mb();
+    smp_rmb();
 }
 
 #define NEXT_ARG(fmt, args)                                                 \
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.