diff options
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 68dda513cd72..0892b75eeedd 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -239,6 +239,9 @@ int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id) | |||
239 | } | 239 | } |
240 | vcpu->run = page_address(page); | 240 | vcpu->run = page_address(page); |
241 | 241 | ||
242 | kvm_vcpu_set_in_spin_loop(vcpu, false); | ||
243 | kvm_vcpu_set_dy_eligible(vcpu, false); | ||
244 | |||
242 | r = kvm_arch_vcpu_init(vcpu); | 245 | r = kvm_arch_vcpu_init(vcpu); |
243 | if (r < 0) | 246 | if (r < 0) |
244 | goto fail_free_run; | 247 | goto fail_free_run; |
@@ -1585,6 +1588,7 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me) | |||
1585 | int pass; | 1588 | int pass; |
1586 | int i; | 1589 | int i; |
1587 | 1590 | ||
1591 | kvm_vcpu_set_in_spin_loop(me, true); | ||
1588 | /* | 1592 | /* |
1589 | * We boost the priority of a VCPU that is runnable but not | 1593 | * We boost the priority of a VCPU that is runnable but not |
1590 | * currently running, because it got preempted by something | 1594 | * currently running, because it got preempted by something |
@@ -1610,6 +1614,7 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me) | |||
1610 | } | 1614 | } |
1611 | } | 1615 | } |
1612 | } | 1616 | } |
1617 | kvm_vcpu_set_in_spin_loop(me, false); | ||
1613 | } | 1618 | } |
1614 | EXPORT_SYMBOL_GPL(kvm_vcpu_on_spin); | 1619 | EXPORT_SYMBOL_GPL(kvm_vcpu_on_spin); |
1615 | 1620 | ||