diff options
-rw-r--r-- | arch/x86/kvm/x86.c | 10 | ||||
-rw-r--r-- | include/linux/kvm.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 552be51e4d84..9f72a443455b 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1564,6 +1564,7 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
1564 | case KVM_CAP_VCPU_EVENTS: | 1564 | case KVM_CAP_VCPU_EVENTS: |
1565 | case KVM_CAP_HYPERV: | 1565 | case KVM_CAP_HYPERV: |
1566 | case KVM_CAP_HYPERV_VAPIC: | 1566 | case KVM_CAP_HYPERV_VAPIC: |
1567 | case KVM_CAP_HYPERV_SPIN: | ||
1567 | r = 1; | 1568 | r = 1; |
1568 | break; | 1569 | break; |
1569 | case KVM_CAP_COALESCED_MMIO: | 1570 | case KVM_CAP_COALESCED_MMIO: |
@@ -3827,7 +3828,14 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu) | |||
3827 | 3828 | ||
3828 | trace_kvm_hv_hypercall(code, fast, rep_cnt, rep_idx, ingpa, outgpa); | 3829 | trace_kvm_hv_hypercall(code, fast, rep_cnt, rep_idx, ingpa, outgpa); |
3829 | 3830 | ||
3830 | res = HV_STATUS_INVALID_HYPERCALL_CODE; | 3831 | switch (code) { |
3832 | case HV_X64_HV_NOTIFY_LONG_SPIN_WAIT: | ||
3833 | kvm_vcpu_on_spin(vcpu); | ||
3834 | break; | ||
3835 | default: | ||
3836 | res = HV_STATUS_INVALID_HYPERCALL_CODE; | ||
3837 | break; | ||
3838 | } | ||
3831 | 3839 | ||
3832 | ret = res | (((u64)rep_done & 0xfff) << 32); | 3840 | ret = res | (((u64)rep_done & 0xfff) << 32); |
3833 | if (longmode) { | 3841 | if (longmode) { |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 5ce61738dc30..4c4937e7f65f 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -499,6 +499,7 @@ struct kvm_ioeventfd { | |||
499 | #define KVM_CAP_PPC_SEGSTATE 43 | 499 | #define KVM_CAP_PPC_SEGSTATE 43 |
500 | #define KVM_CAP_HYPERV 44 | 500 | #define KVM_CAP_HYPERV 44 |
501 | #define KVM_CAP_HYPERV_VAPIC 45 | 501 | #define KVM_CAP_HYPERV_VAPIC 45 |
502 | #define KVM_CAP_HYPERV_SPIN 46 | ||
502 | 503 | ||
503 | #ifdef KVM_CAP_IRQ_ROUTING | 504 | #ifdef KVM_CAP_IRQ_ROUTING |
504 | 505 | ||