diff options
author | Mark Brown <broonie@kernel.org> | 2016-05-04 14:41:51 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-05-04 14:41:51 +0100 |
commit | 3d277b177918cd26215732fc23af0783ab4b37dd (patch) | |
tree | 2033b4f517415e9e68eb066fa073b79a3884e03d /arch/x86/kvm/hyperv.c | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) | |
parent | 02da2d72174c61988eb4456b53f405e3ebdebce4 (diff) | |
download | linux-3d277b177918cd26215732fc23af0783ab4b37dd.tar.gz linux-3d277b177918cd26215732fc23af0783ab4b37dd.tar.xz |
Merge tag 'v4.6-rc5' into spi-rockchip
Linux 4.6-rc5
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; |