qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v1 5/5] kvm/x86: Reject Hyper-V hypercall continuati


From: Andrey Smetanin
Subject: [Qemu-devel] [PATCH v1 5/5] kvm/x86: Reject Hyper-V hypercall continuation
Date: Tue, 12 Jan 2016 13:50:42 +0300

Currently we do not support Hyper-V hypercall continuation
so reject it.

Signed-off-by: Andrey Smetanin <address@hidden>
Reviewed-by: Roman Kagan <address@hidden>
CC: Gleb Natapov <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Joerg Roedel <address@hidden>
CC: "K. Y. Srinivasan" <address@hidden>
CC: Haiyang Zhang <address@hidden>
CC: Roman Kagan <address@hidden>
CC: Denis V. Lunev <address@hidden>
CC: address@hidden
---
 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 76c9ec4..bc4884e 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);
@@ -1099,6 +1105,7 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
                break;
        }
 
+set_result:
        ret = res | (((u64)rep_done & 0xfff) << 32);
        kvm_hv_hypercall_set_result(vcpu, ret);
        return 1;
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]