From 0fb0de8b24e85d0317191f65c0c531aaa9d0e93c Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 17 Aug 2018 13:52:20 +0200 Subject: [PATCH] x86/HVM: correct an inverted check in hvm_load() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- xen/arch/x86/hvm/save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ( ; ; ) -- 2.30.2