x86/HVM: correct an inverted check in hvm_load()
authorJan Beulich <jbeulich@suse.com>
Fri, 17 Aug 2018 11:52:20 +0000 (13:52 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Aug 2018 11:52:20 +0000 (13:52 +0200)
Clearly we want to put a vCPU to sleep if it is _not_ already down.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/save.c

index 422b96c0165969c46ca7787df4cc0a88a08b26a0..d2dc430c0c5709e01741642e25677ed8df766e01 100644 (file)
@@ -268,7 +268,7 @@ int hvm_load(struct domain *d, hvm_domain_context_t *h)
 
     /* 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 ( ; ; )