1 /* 2 * Stubs for CONFIG_HYPERV=n 3 * 4 * Copyright (c) 2015-2018 Virtuozzo International GmbH. 5 * 6 * This work is licensed under the terms of the GNU GPL, version 2 or later. 7 * See the COPYING file in the top-level directory. 8 */ 9 10 #include "qemu/osdep.h" 11 #include "hyperv.h" 12 13 #ifdef CONFIG_KVM 14 int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) 15 { 16 switch (exit->type) { 17 case KVM_EXIT_HYPERV_SYNIC: 18 if (!hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC)) { 19 return -1; 20 } 21 22 /* 23 * Tracking the changes in the MSRs is unnecessary as there are no 24 * users for them beside save/load, which is handled nicely by the 25 * generic MSR save/load code 26 */ 27 return 0; 28 case KVM_EXIT_HYPERV_HCALL: 29 exit->u.hcall.result = HV_STATUS_INVALID_HYPERCALL_CODE; 30 return 0; 31 default: 32 return -1; 33 } 34 } 35 #endif 36 37 int hyperv_x86_synic_add(X86CPU *cpu) 38 { 39 return -ENOSYS; 40 } 41 42 void hyperv_x86_synic_reset(X86CPU *cpu) 43 { 44 } 45 46 void hyperv_x86_synic_update(X86CPU *cpu) 47 { 48 } 49