Message ID | 20210520104343.317119-3-joerichey94@gmail.com |
---|---|
State | New |
Headers | show |
Series | [1/6] x86/elf: Don't use BIT() macro in UAPI headers | expand |
This feedback applies to all patches in this series. On Thu, May 20, 2021, Joe Richey wrote: > From: Joe Richey <joerichey@google.com> > > A previous patch Heh, I think it goes without saying that the code was introduced by a previous patch, unless you've invented a time machine, in which case we should talk... > [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 Linking to the patch isn't helpful/desirable in this case because it doesn't provide any info about when the commit actually landed in the kernel. And depending on the whims of the maintainer, what was posted may not exactly match the code that was commited. What you want is a Fixes: tag that points at the offending commit. The Fixes: tag will also get the fix picked up for stable kernels, though in KVM we often explicitly add "Cc: stable@vger.kernel.org" (though IIRC tglx prefers not to have the explicit Cc). Anyways, the changelog can simply be something like: Replace BIT() in KVM's UAPI header with an open coded equivalent. BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: fb04a1eddb1a ("KVM: X86: Implement ring-based dirty memory tracking") Signed-off-by: Joe Richey <joerichey@google.com>
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 /*