Skip to content

Commit 882dd4a

Browse files
deeglazebonzini
authored andcommitted
kvm: x86: use a uapi-friendly macro for BIT
Change uapi header uses of BIT to instead use the uapi/linux/const.h bit macros, since BIT is not defined in uapi headers. The PMU mask uses _BITUL since it targets a 32 bit flag field, whereas the longmode definition is meant for a 64 bit flag field. Cc: Sean Christophersen <[email protected]> Cc: Paolo Bonzini <[email protected]> Signed-off-by: Dionna Glaze <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 3c7a8e1 commit 882dd4a

File tree

1 file changed

+4
-3
lines changed
  • arch/x86/include/uapi/asm

1 file changed

+4
-3
lines changed

arch/x86/include/uapi/asm/kvm.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*
88
*/
99

10+
#include <linux/const.h>
1011
#include <linux/types.h>
1112
#include <linux/ioctl.h>
1213
#include <linux/stddef.h>
@@ -526,7 +527,7 @@ struct kvm_pmu_event_filter {
526527
#define KVM_PMU_EVENT_ALLOW 0
527528
#define KVM_PMU_EVENT_DENY 1
528529

529-
#define KVM_PMU_EVENT_FLAG_MASKED_EVENTS BIT(0)
530+
#define KVM_PMU_EVENT_FLAG_MASKED_EVENTS _BITUL(0)
530531
#define KVM_PMU_EVENT_FLAGS_VALID_MASK (KVM_PMU_EVENT_FLAG_MASKED_EVENTS)
531532

532533
/*
@@ -552,15 +553,15 @@ struct kvm_pmu_event_filter {
552553
(GENMASK_ULL(7, 0) | GENMASK_ULL(35, 32))
553554
#define KVM_PMU_MASKED_ENTRY_UMASK_MASK (GENMASK_ULL(63, 56))
554555
#define KVM_PMU_MASKED_ENTRY_UMASK_MATCH (GENMASK_ULL(15, 8))
555-
#define KVM_PMU_MASKED_ENTRY_EXCLUDE (BIT_ULL(55))
556+
#define KVM_PMU_MASKED_ENTRY_EXCLUDE (_BITULL(55))
556557
#define KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT (56)
557558

558559
/* for KVM_{GET,SET,HAS}_DEVICE_ATTR */
559560
#define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */
560561
#define KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */
561562

562563
/* x86-specific KVM_EXIT_HYPERCALL flags. */
563-
#define KVM_EXIT_HYPERCALL_LONG_MODE BIT(0)
564+
#define KVM_EXIT_HYPERCALL_LONG_MODE _BITULL(0)
564565

565566
#define KVM_X86_DEFAULT_VM 0
566567
#define KVM_X86_SW_PROTECTED_VM 1

0 commit comments

Comments
 (0)