lkml.org 
[lkml]   [2021]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/6] KVM: X86: Don't use BIT() macro in UAPI headers
Date
From: Joe Richey <joerichey@google.com>

A previous patch [1] used the BIT() macro to define the
KVM_DIRTY_GFN_F_* constants in KVM's UAPI header.

This macro is defined in the kernel but not in the UAPI headers.

[1] https://patchwork.kernel.org/patch/11854393

Signed-off-by: Joe Richey <joerichey@google.com>
---
include/uapi/linux/kvm.h | 4 ++--
tools/include/uapi/linux/kvm.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 3fd9a7e9d90c..8f8a0fd7cd65 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -1879,8 +1879,8 @@ struct kvm_hyperv_eventfd {
* conversion after harvesting an entry. Also, it must not skip any
* dirty bits, so that dirty bits are always harvested in sequence.
*/
-#define KVM_DIRTY_GFN_F_DIRTY BIT(0)
-#define KVM_DIRTY_GFN_F_RESET BIT(1)
+#define KVM_DIRTY_GFN_F_DIRTY (1 << 0)
+#define KVM_DIRTY_GFN_F_RESET (1 << 1)
#define KVM_DIRTY_GFN_F_MASK 0x3

/*
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index 3fd9a7e9d90c..8f8a0fd7cd65 100644
--- a/tools/include/uapi/linux/kvm.h
+++ b/tools/include/uapi/linux/kvm.h
@@ -1879,8 +1879,8 @@ struct kvm_hyperv_eventfd {
* conversion after harvesting an entry. Also, it must not skip any
* dirty bits, so that dirty bits are always harvested in sequence.
*/
-#define KVM_DIRTY_GFN_F_DIRTY BIT(0)
-#define KVM_DIRTY_GFN_F_RESET BIT(1)
+#define KVM_DIRTY_GFN_F_DIRTY (1 << 0)
+#define KVM_DIRTY_GFN_F_RESET (1 << 1)
#define KVM_DIRTY_GFN_F_MASK 0x3

/*
--
2.31.1
\
 
 \ /
  Last update: 2021-05-20 14:09    [W:0.389 / U:1.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site