Skip to content

Commit fb1070d

Browse files
josephlrbonzini
authored andcommitted
KVM: X86: Use _BITUL() macro in UAPI headers
Replace BIT() in KVM's UPAI header with _BITUL(). BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: fb04a1e ("KVM: X86: Implement ring-based dirty memory tracking") Signed-off-by: Joe Richey <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 33090a8 commit fb1070d

File tree

2 files changed

+6
-4
lines changed
  • include/uapi/linux
  • tools/include/uapi/linux

2 files changed

+6
-4
lines changed

include/uapi/linux/kvm.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Note: you must update KVM_API_VERSION if you change this interface.
99
*/
1010

11+
#include <linux/const.h>
1112
#include <linux/types.h>
1213
#include <linux/compiler.h>
1314
#include <linux/ioctl.h>
@@ -1879,8 +1880,8 @@ struct kvm_hyperv_eventfd {
18791880
* conversion after harvesting an entry. Also, it must not skip any
18801881
* dirty bits, so that dirty bits are always harvested in sequence.
18811882
*/
1882-
#define KVM_DIRTY_GFN_F_DIRTY BIT(0)
1883-
#define KVM_DIRTY_GFN_F_RESET BIT(1)
1883+
#define KVM_DIRTY_GFN_F_DIRTY _BITUL(0)
1884+
#define KVM_DIRTY_GFN_F_RESET _BITUL(1)
18841885
#define KVM_DIRTY_GFN_F_MASK 0x3
18851886

18861887
/*

tools/include/uapi/linux/kvm.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Note: you must update KVM_API_VERSION if you change this interface.
99
*/
1010

11+
#include <linux/const.h>
1112
#include <linux/types.h>
1213
#include <linux/compiler.h>
1314
#include <linux/ioctl.h>
@@ -1834,8 +1835,8 @@ struct kvm_hyperv_eventfd {
18341835
* conversion after harvesting an entry. Also, it must not skip any
18351836
* dirty bits, so that dirty bits are always harvested in sequence.
18361837
*/
1837-
#define KVM_DIRTY_GFN_F_DIRTY BIT(0)
1838-
#define KVM_DIRTY_GFN_F_RESET BIT(1)
1838+
#define KVM_DIRTY_GFN_F_DIRTY _BITUL(0)
1839+
#define KVM_DIRTY_GFN_F_RESET _BITUL(1)
18391840
#define KVM_DIRTY_GFN_F_MASK 0x3
18401841

18411842
/*

0 commit comments

Comments
 (0)