Re: [PATCH] kvm: x86: use a uapi-friendly macro for BIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/12/23 16:27, Sean Christopherson wrote:
-#define KVM_PMU_EVENT_FLAG_MASKED_EVENTS BIT(0)
+#define KVM_PMU_EVENT_FLAG_MASKED_EVENTS _BITUL(0)
It's not just BIT(), won't BIT_ULL() and GENMASK_ULL() also be problematic?  And
sadly, I don't see an existing equivalent for GENMASK_ULL().

BIT_ULL() is easy enough, as you point out:

@@ -550,7 +550,7 @@ struct kvm_pmu_event_filter {
        (GENMASK_ULL(7, 0) | GENMASK_ULL(35, 32))
 #define KVM_PMU_MASKED_ENTRY_UMASK_MASK                (GENMASK_ULL(63, 56))
 #define KVM_PMU_MASKED_ENTRY_UMASK_MATCH       (GENMASK_ULL(15, 8))
-#define KVM_PMU_MASKED_ENTRY_EXCLUDE           (BIT_ULL(55))
+#define KVM_PMU_MASKED_ENTRY_EXCLUDE           (_BITULL(55))
 #define KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT  (56)

 /* for KVM_{GET,SET,HAS}_DEVICE_ATTR */

And I'll squash it into Dionna's patch since she has already a conversion
for KVM_EXIT_HYPERCALL_LONG_MODE.  For the others, I'll send a patch.

Paolo





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux