From: Jan Beulich Date: Fri, 17 Aug 2018 11:52:20 +0000 (+0200) Subject: x86/HVM: correct an inverted check in hvm_load() X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3455 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0fb0de8b24e85d0317191f65c0c531aaa9d0e93c;p=xen.git x86/HVM: correct an inverted check in hvm_load() Clearly we want to put a vCPU to sleep if it is _not_ already down. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c index 422b96c016..d2dc430c0c 100644 --- 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_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 ( ; ; )