|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] 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 <jbeulich@xxxxxxxx>
---
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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |