History

KVM: Unconditionally export KVM_CAP_USER_NMI

The idea between capabilities and the KVM_CHECK_EXTENSION ioctl is that userspace can, at run-time, determine if a feature is supported or not. This allows KVM to being supporting a new feature with a new kernel version without any need to update user space. Unfortunately, since the definition of KVM_CAP_USER_NMI was guarded by #ifdef __KVM_HAVE_USER_NMI, such discovery still required a user space update. Therefore, unconditionally export KVM_CAP_USER_NMI and change the the typo in the comment for the IOCTL number definition as well.

Christoffer Dall committed 12 years ago

Commit 44b5ce71 parent 0f8a4de1 file · +1 −3Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/kvm.h+1−3
@@ -654,9 +654,7 @@ struct kvm_ppc_smmu_info { · 653 unmodified lines
654#endif654#endif
655/* Bug in KVM_SET_USER_MEMORY_REGION fixed: */655/* Bug in KVM_SET_USER_MEMORY_REGION fixed: */
656#define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21656#define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21
657#ifdef __KVM_HAVE_USER_NMI
658#define KVM_CAP_USER_NMI 22657#define KVM_CAP_USER_NMI 22
659#endif
660#ifdef __KVM_HAVE_GUEST_DEBUG658#ifdef __KVM_HAVE_GUEST_DEBUG
661#define KVM_CAP_SET_GUEST_DEBUG 23659#define KVM_CAP_SET_GUEST_DEBUG 23
662#endif660#endif
@@ -1091,7 +1089,7 @@ struct kvm_s390_ucas_mapping { · 428 unmodified lines
1091#define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97)1089#define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97)
1092#define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state)1090#define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state)
1093#define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state)1091#define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state)
1094/* Available with KVM_CAP_NMI */1092/* Available with KVM_CAP_USER_NMI */
1095#define KVM_NMI _IO(KVMIO, 0x9a)1093#define KVM_NMI _IO(KVMIO, 0x9a)
1096/* Available with KVM_CAP_SET_GUEST_DEBUG */1094/* Available with KVM_CAP_SET_GUEST_DEBUG */
1097#define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug)1095#define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug)