On 01/08/18 16:36, Jan Beulich wrote:
> Clearly we want to put a vCPU to sleep if it is _not_ already down.
>
> Signed-off-by: Jan Beulich <jbeul...@suse.com>
> ---
> TBD: Since the flaw apparently never mattered, I imply that the function
>      is never called with any vCPU up. Hence an alternative might be to
>      simply return an error if a vCPU doesn't have VPF_down set.

With Remus/COLO, we should hit this path with an up vCPU on every
iteration after the first.  Given this bug, I'm struggling to see how it
works at all.

~Andrew

>
> --- a/xen/arch/x86/hvm/save.c
> +++ b/xen/arch/x86/hvm/save.c
> @@ -268,7 +268,7 @@ int hvm_load(struct domain *d, hvm_domai
>  
>      /* Down all the vcpus: we only re-enable the ones that had state saved. 
> */
>      for_each_vcpu(d, v)
> -        if ( test_and_set_bit(_VPF_down, &v->pause_flags) )
> +        if ( !test_and_set_bit(_VPF_down, &v->pause_flags) )
>              vcpu_sleep_nosync(v);
>  
>      for ( ; ; )
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to