> -----Original Message-----
> From: Jan Beulich <[email protected]>
> Sent: 02 February 2021 15:14
> To: [email protected]
> Cc: Paul Durrant <[email protected]>; George Dunlap <[email protected]>
> Subject: [PATCH v2 1/2] IOREQ: fix waiting for broadcast completion
> 
> 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 <[email protected]>

Reviewed-by: Paul Durrant <[email protected]>

> ---
> v2: New.
> 
> --- a/xen/common/ioreq.c
> +++ b/xen/common/ioreq.c
> @@ -213,9 +213,9 @@ bool vcpu_ioreq_handle_completion(struct
>          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;



Reply via email to