diff options
author | KarimAllah Ahmed <karahmed@amazon.de> | 2018-04-17 00:43:58 -0400 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-04-27 12:37:17 -0400 |
commit | 5e62493f1a70e7f13059544daaee05e40e8548e2 (patch) | |
tree | 56e9cf104d58f3a7b0580fc265ff9262c58566d1 | |
parent | a468f2dbf921d02f5107378501693137a812999b (diff) |
x86/headers/UAPI: Move DISABLE_EXITS KVM capability bits to the UAPI
Move DISABLE_EXITS KVM capability bits to the UAPI just like the rest of
capabilities.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: x86@kernel.org
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
-rw-r--r-- | arch/x86/kvm/x86.h | 7 | ||||
-rw-r--r-- | include/uapi/linux/kvm.h | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index 7d35ce672989..c9492f764902 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h | |||
@@ -302,13 +302,6 @@ static inline u64 nsec_to_cycles(struct kvm_vcpu *vcpu, u64 nsec) | |||
302 | __rem; \ | 302 | __rem; \ |
303 | }) | 303 | }) |
304 | 304 | ||
305 | #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) | ||
306 | #define KVM_X86_DISABLE_EXITS_HTL (1 << 1) | ||
307 | #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) | ||
308 | #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ | ||
309 | KVM_X86_DISABLE_EXITS_HTL | \ | ||
310 | KVM_X86_DISABLE_EXITS_PAUSE) | ||
311 | |||
312 | static inline bool kvm_mwait_in_guest(struct kvm *kvm) | 305 | static inline bool kvm_mwait_in_guest(struct kvm *kvm) |
313 | { | 306 | { |
314 | return kvm->arch.mwait_in_guest; | 307 | return kvm->arch.mwait_in_guest; |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 1065006c9bf5..b02c41e53d56 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
@@ -676,6 +676,13 @@ struct kvm_ioeventfd { | |||
676 | __u8 pad[36]; | 676 | __u8 pad[36]; |
677 | }; | 677 | }; |
678 | 678 | ||
679 | #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) | ||
680 | #define KVM_X86_DISABLE_EXITS_HTL (1 << 1) | ||
681 | #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) | ||
682 | #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ | ||
683 | KVM_X86_DISABLE_EXITS_HTL | \ | ||
684 | KVM_X86_DISABLE_EXITS_PAUSE) | ||
685 | |||
679 | /* for KVM_ENABLE_CAP */ | 686 | /* for KVM_ENABLE_CAP */ |
680 | struct kvm_enable_cap { | 687 | struct kvm_enable_cap { |
681 | /* in */ | 688 | /* in */ |