aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/hyperv.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/hyperv.c')
-rw-r--r--arch/x86/kvm/hyperv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 98618e397342..5708e951a5c6 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -1265,7 +1265,7 @@ static int kvm_hv_hypercall_complete_userspace(struct kvm_vcpu *vcpu)
1265 struct kvm_run *run = vcpu->run; 1265 struct kvm_run *run = vcpu->run;
1266 1266
1267 kvm_hv_hypercall_set_result(vcpu, run->hyperv.u.hcall.result); 1267 kvm_hv_hypercall_set_result(vcpu, run->hyperv.u.hcall.result);
1268 return 1; 1268 return kvm_skip_emulated_instruction(vcpu);
1269} 1269}
1270 1270
1271static u16 kvm_hvcall_signal_event(struct kvm_vcpu *vcpu, bool fast, u64 param) 1271static u16 kvm_hvcall_signal_event(struct kvm_vcpu *vcpu, bool fast, u64 param)
@@ -1296,8 +1296,10 @@ static u16 kvm_hvcall_signal_event(struct kvm_vcpu *vcpu, bool fast, u64 param)
1296 if (param & ~KVM_HYPERV_CONN_ID_MASK) 1296 if (param & ~KVM_HYPERV_CONN_ID_MASK)
1297 return HV_STATUS_INVALID_HYPERCALL_INPUT; 1297 return HV_STATUS_INVALID_HYPERCALL_INPUT;
1298 1298
1299 /* conn_to_evt is protected by vcpu->kvm->srcu */ 1299 /* the eventfd is protected by vcpu->kvm->srcu, but conn_to_evt isn't */
1300 rcu_read_lock();
1300 eventfd = idr_find(&vcpu->kvm->arch.hyperv.conn_to_evt, param); 1301 eventfd = idr_find(&vcpu->kvm->arch.hyperv.conn_to_evt, param);
1302 rcu_read_unlock();
1301 if (!eventfd) 1303 if (!eventfd)
1302 return HV_STATUS_INVALID_PORT_ID; 1304 return HV_STATUS_INVALID_PORT_ID;
1303 1305