[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <59754ef1-c49d-11a6-30ba-8b938a6bb45d@redhat.com>
Date: Mon, 24 May 2021 14:28:44 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Joe Richey <joerichey94@...il.com>, trivial@...nel.org
Cc: Joe Richey <joerichey@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Mark Rutland <mark.rutland@....com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Zhangfei Gao <zhangfei.gao@...aro.org>,
Zhou Wang <wangzhou1@...ilicon.com>,
Andy Whitcroft <apw@...onical.com>,
Joe Perches <joe@...ches.com>,
Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
Andi Kleen <ak@...ux.intel.com>,
"Chang S. Bae" <chang.seok.bae@...el.com>,
Sasha Levin <sashal@...nel.org>, Peter Xu <peterx@...hat.com>,
Lei Cao <lei.cao@...atus.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
Zaibo Xu <xuzaibo@...wei.com>,
Kenneth Lee <liguozhu@...ilicon.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org,
linux-accelerators@...ts.ozlabs.org
Subject: Re: [PATCH v2 2/7] KVM: X86: Use _BITUL() macro in UAPI headers
On 21/05/21 10:58, Joe Richey wrote:
> From: Joe Richey <joerichey@...gle.com>
>
> 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: fb04a1eddb1a ("KVM: X86: Implement ring-based dirty memory tracking")
> Signed-off-by: Joe Richey <joerichey@...gle.com>
> ---
> include/uapi/linux/kvm.h | 5 +++--
> tools/include/uapi/linux/kvm.h | 5 +++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 3fd9a7e9d90c..79d9c44d1ad7 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -8,6 +8,7 @@
> * Note: you must update KVM_API_VERSION if you change this interface.
> */
>
> +#include <linux/const.h>
> #include <linux/types.h>
> #include <linux/compiler.h>
> #include <linux/ioctl.h>
> @@ -1879,8 +1880,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 _BITUL(0)
> +#define KVM_DIRTY_GFN_F_RESET _BITUL(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..79d9c44d1ad7 100644
> --- a/tools/include/uapi/linux/kvm.h
> +++ b/tools/include/uapi/linux/kvm.h
> @@ -8,6 +8,7 @@
> * Note: you must update KVM_API_VERSION if you change this interface.
> */
>
> +#include <linux/const.h>
> #include <linux/types.h>
> #include <linux/compiler.h>
> #include <linux/ioctl.h>
> @@ -1879,8 +1880,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 _BITUL(0)
> +#define KVM_DIRTY_GFN_F_RESET _BITUL(1)
> #define KVM_DIRTY_GFN_F_MASK 0x3
>
> /*
>
Queued thi sone, thanks.
Paolo
Powered by blists - more mailing lists