diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-18 21:28:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-18 21:28:28 +0200 |
commit | 5614e7725856ea383f458377980298111439e0fb (patch) | |
tree | 82560034c3a17ee18073420406ba1228935e2967 /arch/x86/kvm/hyperv.c | |
parent | devcoredump: add scatterlist support (diff) | |
parent | Linux 4.6-rc4 (diff) | |
download | linux-5614e7725856ea383f458377980298111439e0fb.tar.xz linux-5614e7725856ea383f458377980298111439e0fb.zip |
Merge 4.6-rc4 into driver-core-next
We want those fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kvm/hyperv.c')
-rw-r--r-- | arch/x86/kvm/hyperv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 5ff3485acb60..01bd7b7a6866 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -1116,6 +1116,11 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu) break; case HVCALL_POST_MESSAGE: case HVCALL_SIGNAL_EVENT: + /* don't bother userspace if it has no way to handle it */ + if (!vcpu_to_synic(vcpu)->active) { + res = HV_STATUS_INVALID_HYPERCALL_CODE; + break; + } vcpu->run->exit_reason = KVM_EXIT_HYPERV; vcpu->run->hyperv.type = KVM_EXIT_HYPERV_HCALL; vcpu->run->hyperv.u.hcall.input = param; |