[PATCH v3 2/2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers

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

 



Add Hyper-V VMBus hypercalls blank handlers which
just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE.

Changes v3:
* use HVCALL_* defines

Changes v2:
* use KVM_EXIT_HYPERV exit type

Signed-off-by: Andrey Smetanin <asmetanin@xxxxxxxxxxxxx>
Reviewed-by: Roman Kagan <rkagan@xxxxxxxxxxxxx>
CC: Paolo Bonzini <pbonzini@xxxxxxxxxx>
CC: Richard Henderson <rth@xxxxxxxxxxx>
CC: Eduardo Habkost <ehabkost@xxxxxxxxxx>
CC: "Andreas Färber" <afaerber@xxxxxxx>
CC: Marcelo Tosatti <mtosatti@xxxxxxxxxx>
CC: Roman Kagan <rkagan@xxxxxxxxxxxxx>
CC: Denis V. Lunev <den@xxxxxxxxxx>
CC: kvm@xxxxxxxxxxxxxxx
---
 target-i386/hyperv.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/target-i386/hyperv.c b/target-i386/hyperv.c
index 6b519c3..c4d6a9b 100644
--- a/target-i386/hyperv.c
+++ b/target-i386/hyperv.c
@@ -44,6 +44,18 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit)
             return -1;
         }
         return 0;
+    case KVM_EXIT_HYPERV_HCALL: {
+        uint16_t code;
+
+        code  = exit->u.hcall.input & 0xffff;
+        switch (code) {
+        case HVCALL_POST_MESSAGE:
+        case HVCALL_SIGNAL_EVENT:
+        default:
+            exit->u.hcall.result = HV_STATUS_INVALID_HYPERCALL_CODE;
+            return 0;
+        }
+    }
     default:
         return -1;
     }
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux