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.

--- 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