aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 03c0ee74d757..f5356358acff 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1590,6 +1590,8 @@ static int set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
1590 1590
1591void kvm_resched(struct kvm_vcpu *vcpu) 1591void kvm_resched(struct kvm_vcpu *vcpu)
1592{ 1592{
1593 if (!need_resched())
1594 return;
1593 vcpu_put(vcpu); 1595 vcpu_put(vcpu);
1594 cond_resched(); 1596 cond_resched();
1595 vcpu_load(vcpu); 1597 vcpu_load(vcpu);