On 2/4/26 11:49 AM, Jan Beulich wrote:
On 22.01.2026 17:47, Oleksii Kurochko wrote:
--- a/xen/arch/riscv/domain.c
+++ b/xen/arch/riscv/domain.c
@@ -259,3 +259,21 @@ void sync_local_execstate(void)
  {
      /* Nothing to do -- no lazy switching */
  }
+
+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).
+     *
+     * Note this is a full barrier to also prevent update of the context
+     * to happen before it was observed.
+     */
+    smp_mb();
+}
Where's the counterpart of this barrier (going to be)?

As it is mentioned in the comment it is invcpu_context_saved(). ~ Oleksii


Reply via email to