From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMFpk-0000p3-0c for qemu-devel@nongnu.org; Thu, 21 Jan 2016 09:03:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMFpa-0005Yc-IU for qemu-devel@nongnu.org; Thu, 21 Jan 2016 09:03:31 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:27170 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMFpZ-0005Uv-NC for qemu-devel@nongnu.org; Thu, 21 Jan 2016 09:03:22 -0500 From: Andrey Smetanin Date: Thu, 21 Jan 2016 17:01:12 +0300 Message-Id: <1453384873-14832-5-git-send-email-asmetanin@virtuozzo.com> In-Reply-To: <1453384873-14832-1-git-send-email-asmetanin@virtuozzo.com> References: <1453384873-14832-1-git-send-email-asmetanin@virtuozzo.com> Subject: [Qemu-devel] [PATCH v2 4/5] kvm/x86: Reject Hyper-V hypercall continuation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvm@vger.kernel.org Cc: Gleb Natapov , Joerg Roedel , qemu-devel@nongnu.org, Roman Kagan , "Denis V. Lunev" , Paolo Bonzini , "K. Y. Srinivasan" , Haiyang Zhang Currently we do not support Hyper-V hypercall continuation so reject it. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 0e7c90f..e1daa8b 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -1083,6 +1083,12 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu) trace_kvm_hv_hypercall(code, fast, rep_cnt, rep_idx, ingpa, outgpa); + /* Hypercall continuation is not supported yet */ + if (rep_cnt || rep_idx) { + res = HV_STATUS_INVALID_HYPERCALL_CODE; + goto set_result; + } + switch (code) { case HV_X64_HCALL_NOTIFY_LONG_SPIN_WAIT: kvm_vcpu_on_spin(vcpu); @@ -1092,6 +1098,7 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu) break; } +set_result: ret = res | (((u64)rep_done & 0xfff) << 32); if (longmode) { kvm_register_write(vcpu, VCPU_REGS_RAX, ret); -- 2.4.3