]> xenbits.xensource.com Git - xen.git/commitdiff
IOREQ: fix waiting for broadcast completion
authorJan Beulich <jbeulich@suse.com>
Thu, 4 Feb 2021 13:01:21 +0000 (14:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 4 Feb 2021 13:01:21 +0000 (14:01 +0100)
Checking just a single server is not enough - all of them must have
signaled that they're done processing the request.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/common/ioreq.c

index 90ed2e03024dd456f3ce39f736390b213d2265af..5b603c052008d64482d88051195ff6f358d05323 100644 (file)
@@ -213,9 +213,9 @@ bool vcpu_ioreq_handle_completion(struct vcpu *v)
         return false;
     }
 
-    sv = get_pending_vcpu(v, &s);
-    if ( sv && !wait_for_io(sv, get_ioreq(s, v)) )
-        return false;
+    while ( (sv = get_pending_vcpu(v, &s)) != NULL )
+        if ( !wait_for_io(sv, get_ioreq(s, v)) )
+            return false;
 
     vio->req.state = ioreq_needs_completion(&vio->req) ?
         STATE_IORESP_READY : STATE_IOREQ_NONE;