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
654654 #endif
655655 /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */
656656 #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21
657−#ifdef __KVM_HAVE_USER_NMI
658657 #define KVM_CAP_USER_NMI 22
659−#endif
660658 #ifdef __KVM_HAVE_GUEST_DEBUG
661659 #define KVM_CAP_SET_GUEST_DEBUG 23
662660 #endif
@@ -1091,7 +1089,7 @@ struct kvm_s390_ucas_mapping { · 428 unmodified lines
10911089 #define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97)
10921090 #define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state)
10931091 #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 */
10951093 #define KVM_NMI _IO(KVMIO, 0x9a)
10961094 /* Available with KVM_CAP_SET_GUEST_DEBUG */
10971095 #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug)