Fix a simple bug in vmx support
authorRonald G. Minnich <rminnich@google.com>
Wed, 5 Feb 2014 17:52:38 +0000 (09:52 -0800)
committerRonald G. Minnich <rminnich@google.com>
Wed, 5 Feb 2014 17:52:38 +0000 (09:52 -0800)
It's not nice to try to run on core -1

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
kern/arch/x86/vmx.c

index 597bf3c..710d08d 100644 (file)
@@ -443,7 +443,7 @@ static struct litevm_vcpu *__vcpu_load(struct litevm_vcpu *vcpu)
        int cpu;
        cpu = core_id();
 
-       if (vcpu->cpu != cpu) {
+       if ((vcpu->cpu != cpu) && (vcpu->cpu != -1)){
                handler_wrapper_t *w;
                smp_call_function_single(vcpu->cpu, __vcpu_clear, vcpu, &w);
                smp_call_wait(w);